void () { for (MyNode node : TreeUtil.treeNodeTraverser(myRoot).filter(MyNode.class)) { node.getConfigurable().disposeUIResources(); if (!(node instanceof MyRootNode)) { node.setUserObject(null); } } myRoot.removeAllChildren(); }