• 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!