|
Quick Lists
|
|
Bug ID:
|
6646781
|
|
Votes
|
0
|
|
Synopsis
|
Nimbus L&F : Menu stays open when continously clicked on internal frame icon on Windows & nimbus L&F
|
|
Category
|
java:classes_swing
|
|
Reported Against
|
|
|
Release Fixed
|
6u10(b26)
|
|
State
|
10-Fix Delivered,
Verified,
bug
|
|
Priority:
|
3-Medium
|
|
Related Bugs
|
4912806
|
|
Submit Date
|
03-JAN-2008
|
|
Description
|
I have a frame which is having a internal frame. When i click on the icon of the internal frame Menu is displayed. When i continously click on the icon. I would expect the menu to close & open . But right now its not happening on windows & nimbus LookAndFeel. but in GTKLookAndFeel the menu opens & closes for every click. As nimbus LookAndFeel is a cross platform lookAndFeel i would expect the behaviour to be same.
Step to reproduce:-
---------------------
1) Run the attached testcases.
2) Click on the icon of the internal frame continously . If you menu stays as it is with out closing & opening, then the bug is reproduced.
This is reproduced in all the nimbus build.
Posted Date : 2008-01-03 09:58:20.0
|
|
Work Around
|
N/A
|
|
Evaluation
|
This bug is easily reproduced with SwingSet2
run SwingSet2
set WindowsLaF
click the InternalFrame icon -> see popup shown
click it again -> popup is still shown
(if you click the frames title is will close the popup)
It works correctly with Motif Laf
(GTL Laf should be checked)
Rather then assigning it to Nimbus or Windows Laf owner
I assign it to the JInternalFrame owner
because it will be easier to solve this problem for all Lafs at once
Posted Date : 2008-01-09 17:03:52.0
The problem is described in 4912806. It solved for some look and feels.
The following code in BasicPopupMenuUI.MouseGrabber.eventDispatched() is devoted to solve the problem:
847 // Ask UIManager about should we consume event that closes
848 // popup. This made to match native apps behaviour.
849 boolean consumeEvent =
850 UIManager.getBoolean("PopupMenu.consumeEventOnClose");
851 // Consume the event so that normal processing stops.
852 if(consumeEvent && !(src instanceof MenuElement)) {
853 ((MouseEvent)ev).consume();
854 }
The solution is simple. For look and feels where the problem appears, the "PopupMenu.consumeEventOnClose" property should be set to TRUE.
Posted Date : 2008-01-17 16:23:38.0
|
|
Comments
|
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|
|
|
 |