-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.3.0_01
-
x86
-
windows_nt
Problem scenario: When using keyboard menmonic's it's possible to set up the same mnemonic for a submenu (JMenuItem) as the one used by the parent menu (JMenu). Normally typing ALT + the mnemonic key when all of the menus' are closed will just open the corresponing menu. But occasionally the sub menu with the same mnemonic opens as well.
For example, A menu called 'AMenu' has the mnemonic 'a' and one of it's sub-menu's is called 'ASubMenuitem' and has the mnemonic 'a'. Sometimes, when opening 'AMenu' by typing ALt-'a' both 'AMenu' and 'ASubMenuitem' will open. This is very intermittant particularly on Solaris. It is easier to reproduce on Windows NT 4.0
The attached test case is a simple JFrame with a JTextArea and a menu. The menu has Sub-Menus. The steps to reprodcuing this are as follows:
User: presses Alt a.
Result: (this is ok)
User: clicks with mouse into textArea.
Result: (this is ok)
____________________________________________________________
User: presses Alt a. again
Result: (this is ok)
User : clicks with mouse into textArea.
Result: (this is ok)
____________________________________________________________
User: presses Alt a. again
Result: (this is the problem)
The sub menu item (Asubmenu) is invoked instead of the main menu (Amainmenu)
(If you don't get this result, please try again the step1 'presses Alt a'
and step2 'click with mouse into textArea'.
- duplicates
-
JDK-4213634 Alt+menmonic char not working when menu & menuitem have same mnemonic char.
-
- Closed
-