public void nodeAdded(String fqn) { MyNode n, p; n = root.add(fqn); if (n != null) { p = (MyNode) n.getParent(); tree_model.reload(p); jtree.scrollPathToVisible(new TreePath(n.getPath())); } }
public void nodeRemoved(String fqn) { MyNode n; TreeNode par; n = root.findNode(fqn); if (n != null) { n.removeAllChildren(); par = n.getParent(); n.removeFromParent(); tree_model.reload(par); } }