| Author |
how to implement -- click right botton to select a JTree's node?
|
Kenny Smith
Greenhorn
Joined: Jan 08, 2002
Posts: 9
|
|
In the default case, you can select a node by click the left botton. But how to implement -- click right botton to select a JTree's node? Thanks.
|
Kenny Smith
|
 |
Gregg Bolinger
Ranch Hand
Joined: Jul 11, 2001
Posts: 15230
|
|
The only other check I do after that is if (selectedNode.isLeaf()) because I implement a JPopup Menu but only on a Leaf. Hope that helps. BTW - Forgot to mention that I do this in the mouseClicked(MouseEvent me) method of my mouse listener I have registered on my JTree. [ February 12, 2003: Message edited by: Gregg Bolinger ]
|
 |
Kenny Smith
Greenhorn
Joined: Jan 08, 2002
Posts: 9
|
|
|
It works, thanks and regards!
|
 |
ramswaroop ram
Greenhorn
Joined: Oct 25, 2011
Posts: 8
|
|
Thanks Gregg Bolinger.. It really healped me..
|
 |
 |
|
|
subject: how to implement -- click right botton to select a JTree's node?
|
|
|