This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

TreeSelectionListener event.  RSS feed

 
SoonAnn Lim
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am wondering how to regenerate the TreeSelectionListener 's valueChanged() event when clicking on a tree leaf node which is already been click previously. I am having trouble to show a same frame after it is closed. I have to collapse and expand the tree so a new TreeSelectionEvent can be genereated. Can someone give some suggestion?
Thanks.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
valueChanged() only gets called when the node selection changes... if you click on a node that is already selected, the selection doesn't change. I would suggest that you use a MouseListener instead, or in addition to, your TreeSelectionListener to detect every time a node is clicked.

-Nate
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!