Problem with JPopupMenu in a JTree
- by Alex
Hi guys
I have this issue. In a custom JTree I implemented a JPopupMenu to display different JMenuItem according to the node selected using a MouseListener.
The JPopupMenu is shown when the mouse right button is clicked. The problem is that if I don’t choose an Item from the PopupMenu but instead I select another node in the tree, either with right or left buttons, this event is never caught by the tree MouseListener
Could anyone point me in the right direction to solve this? In case an example is available I’ll appreciate it.
Thanks.