JTree how to delete a node??
843804Nov 9 2004 — edited Nov 25 2004Hello !
I am trying to use a JTree in a java application.
The problem is that once the tree is drawn, I need to remove some of its nodes . So I use either "removeNodeFromParent " or "removeNode" methods. This goes well (the DefaultTreeNode is actually deleted from the parent ), but the "drawn node" (its representation in the tree) remains in the tree and I have no idea how to make it disappear . I tried the method updateUI() on the panel which contains the tree. I also tried the method "fireTreeNodesRemoved " on the DefaultTreeModel related to this tree, but nothing really works :((
Can you help me?
Thank you very much.