For Programmers: Free Programming Magazines  


Home > Archive > Java Help > May 2006 > ?? How can I update multiple JTrees GUI Simutaneously









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author ?? How can I update multiple JTrees GUI Simutaneously
michaeljavakid

2006-05-20, 1:57 am

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
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com