my dog learned polymorphism*
The moose likes Swing / AWT / SWT and the fly likes How can I update multiple JTrees GUI Simutaneously?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How can I update multiple JTrees GUI Simutaneously??" Watch "How can I update multiple JTrees GUI Simutaneously??" New topic
Author

How can I update multiple JTrees GUI Simutaneously??

michael kid
Greenhorn

Joined: May 20, 2006
Posts: 1
Hi guys, thank you for viewing my thread.

I have 2 JTree objects.(Tree1&Tree2). I wrote a JTree node selection listener which extends the MouseAdaptor to respond to mouse click in my first JTree object(Tree1).

The listener works fine and can return me what I need, for example return me the node I clicked and some associated information which should be used to update my second tree(Tree2) correspondingly. These 2 trees locate in two separated splitPane in one GUI window.

My idea is let the second tree(Tree2) be updated simutaneously upon the clicking in my first JTree node(Tree1).

My question is: How could I inform the second tree(Tree2) about my mouse event in the first tree? I mean how could I let Tree2's GUI update automatically upon any event in Tree1? Should I use multithread for it, such as invokeLater()? Is there any minimum solution for this?

Is there any hints and examples?
Thanks
Michael
[ May 20, 2006: Message edited by: michael kid ]
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How can I update multiple JTrees GUI Simutaneously??
 
Similar Threads
Jtree handles nodeClick when adding items?
Update JTree Node without firing ValueChanged
JTree Selection Customization
Searching a JTree
XML to DOM to JTree