• Post Reply Bookmark Topic Watch Topic
  • New Topic

Pass value to a JPopupMenu by right clicking JTree Node  RSS feed

 
Jennifer Sohl
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to show a popup menu when a user right clicks on a JTree Node. So far all I have for code is to select the node when the user right clicks on it.

Now I want to be able to take that value and pass it to my JPopupMenu class and show the popup menu.
Also I would like to only have the popup menu come up on certain groups of nodes.
I've looked at a few examples, but haven't seen any that pass values to the menu, or select certain nodes.
Could someone please enlighten me?
Thanks!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!