Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

I met a problem when two JTrees reference one root node.

843805Jan 18 2006 — edited Jan 18 2006
There 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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 15 2006
Added on Jan 18 2006
4 comments
103 views