Results 1 to 3 of 3
Thread: JPopupMenu Consecutive Clicks
- 08-14-2012, 11:45 PM #1
Member
- Join Date
- Jul 2010
- Location
- Lima, Peru
- Posts
- 47
- Rep Power
- 0
JPopupMenu Consecutive Clicks
Hello.
1. I have two JTree's, side by side.
2. Both JTrees have a JPopupMenu associated with them.
3. I right click on a node in the JTree1, the jpopupmenu appears.
4. I left click on a node in JTree2.
In theory, if I left click on a node in JTree2, it should select the node.
5. The jpopupmenu disappears, but no node is selected. In fact, the click event is never fired in JTree2.
In other words, THE CLICK EVENT IS NOT FIRING WHILE THE POPUPMENU IS ACTIVATED. The click merely deactivates the popup menu, but the click event on the tree is never fired.
Please help me if you know why this is, and how to solve this. Is this a bug?
Thanks so much.
- 08-15-2012, 12:20 AM #2
Member
- Join Date
- Jul 2010
- Location
- Lima, Peru
- Posts
- 47
- Rep Power
- 0
Re: JPopupMenu Consecutive Clicks
I have found the solution.
UIManager.put("PopupMenu.consumeEventOnClose", Boolean.FALSE);
- 08-15-2012, 05:20 PM #3
Member
- Join Date
- Jul 2010
- Location
- Lima, Peru
- Posts
- 47
- Rep Power
- 0
Re: JPopupMenu Consecutive Clicks
Yes, this was a bug.
I found the bug explanation here, if anyone is interested. Apparently mousePressed() is not fired when the JPopupMenu is visible.
Bug ID: 6753637 Windows LNF prevents mousePressed() from being called when JPopupMenuvisible
regards
Similar Threads
-
four consecutive characters
By aortell24 in forum New To JavaReplies: 3Last Post: 06-19-2012, 02:32 AM -
Consecutive null valors identifier - Suggestions
By Bonfy in forum New To JavaReplies: 4Last Post: 01-23-2012, 05:50 PM -
Differentiating user clicks and doClick clicks?
By jiffi in forum New To JavaReplies: 19Last Post: 01-13-2012, 08:30 AM -
Checking for two consecutive elements in Collection
By Ciwan in forum New To JavaReplies: 23Last Post: 07-04-2011, 02:26 AM -
Responding to clicks outside a window
By bayan in forum New To JavaReplies: 6Last Post: 06-14-2010, 04:51 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks