This discussion is archived
5 Replies Latest reply: Feb 13, 2013 3:40 AM by 800268 RSS

how to update jtree after removing or adding new node?

814246 Newbie
Currently Being Moderated
after removing the nodes from jtree , nodes are still there but with no dotted lines.
i think my model is not updated properly or jtree is not getting notified properly.

Im using DefaultTableModel and my nodes are of user class which extends DefaultMutableTreeNode Class.

i tired method:

model.reload(node);
model.nodeStructureChanged(node);
model.nodeChanged(node);

but nothing is working properly. nodes are still there but only branch lines (dotted lines) are gone.

any suggestions!!

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points