JDK-4750590 : SwingSet: Cannot change Themes using menu accelerators
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.1
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic,windows_nt,windows_2000
  • CPU: generic,x86
  • Submitted: 2002-09-20
  • Updated: 2003-02-05
  • Resolved: 2002-11-02
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other Other
1.4.1_03 03Fixed 1.4.2Fixed
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Description
To reproduce, run SwingSet and try to change the Theme using only menu accelerators.  This no longer has any effect, and the menu stays popped open.  This is true on Win2K, Solaris 9, and RedHat 7.2.  In 1.4, this worked correctly.  As of 1.4.1, this no longer works.  Menu accelerators for other menu items (File->About) work correctly.

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: 1.4.1_03 mantis FIXED IN: 1.4.1_03 mantis INTEGRATED IN: 1.4.1_03 mantis mantis-b06
24-08-2004

WORK AROUND
24-08-2004

SUGGESTED FIX Name: azR10139 Date: 10/09/2002 ------- BasicMenuUI.java ------- *** /tmp/sccs.l5aazy Tue Oct 8 19:09:01 2002 --- BasicMenuUI.java Tue Sep 24 19:01:04 2002 *************** *** 542,547 **** --- 542,552 ---- if (!Character.isLetterOrDigit(keyChar)) return; + // Do not try to forward event to menuitems if popup is not shown + if(!((JMenu)menuItem).isPopupMenuVisible()) { + return; + } + MenuSelectionManager manager = e.getMenuSelectionManager(); MenuElement path[] = e.getPath(); MenuElement selectedPath[] = manager.getSelectedPath(); ======================================================================
24-08-2004

PUBLIC COMMENTS
24-08-2004

EVALUATION xxxx Name: azR10139 Date: 10/09/2002 The reason of the bug is that method BasicMenuUI.menuKeyPressed() do not perform check that menu is currently opened before applying this event to his menuitems. The idea of suggested fix is to check if popup of menu is visible before forwarding event to menuitems and do not forward event if not so. ###@###.### 10/09/2002 ====================================================================== commit this fix to 1.4.1_03 ###@###.### 2002-12-04
09-10-2002