• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How can I update multiple JTrees GUI Simutaneously??

 
michael kid
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic