This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Event on selecing the same node in a JTree

 
Ashish Chopra
Ranch Hand
Posts: 134
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to handle a scenario in my code where the trigger is the selection of an already selected tree node. Now I have a TreeListener attached to the tree, but it only generates an event in case I select a node different from the one already selected.

Is there any other type of listener that I can attach with my tree that will allow me to catch the re-selection of an already selected node?
 
Craig Wood
Ranch Hand
Posts: 1535
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could add a MouseListener to listen for mouse selections. The JTree api has methods for
finding the row and path for any given view location and for finding the current selection(s).
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic