void () { final TreePath path = myTree.getSelectionPath(); if (path != null) { final NamedConfigurable configurable = ((MyNode)path.getLastPathComponent()).getConfigurable(); if (configurable instanceof JdkConfigurable) { configurable.updateName(); } } }