I met a problem when two JTrees reference one root node.
843805Jan 18 2006 — edited Jan 18 2006There are two JTrees tree1 and tree2. tree1's model is model1 which is a DefaultTreeModel. tree2's model is model2 which is also a DefaultTreeModel. The special thing is that tree1 and tree2 reference the same root node. When I change the root node by the following codes:
model1.insertNodeInto(child, root, root.getChildCount());
The UI of the tree1 has been refreshed, but the UI of the tree2 hasn't been refreshed. What's the reason? How can I let the UI of the tree2 refreshed? Any advice is welcome. Thanks in advance.