Duplicate :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
FULL PRODUCT VERSION : java version "1.6.0-rc" Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-rc-b71) Java HotSpot(TM) Client VM (build 1.6.0-rc-b71, mixed mode, sharing) ADDITIONAL OS VERSION INFORMATION : Windows XP [Wersja 5.1.2600] A DESCRIPTION OF THE PROBLEM : Keyboard shortcut for menu items work only once. For the first time after application has been launched correct menu option is executed, no matter which. But when I press again the same keyboard shortcut, or any other defined shortcut, nothing happens. But when I swicth to another application (by Windows Alt+Tab), then when I am back the shortcut works again but again only once. In J2SE 5 everything works properly. Keyboard shortcut was defined by means of setAccelerator(), menuItem.setMnemonic('a'); menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_A,ActionEvent.CTRL_MASK)); STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : I have prepared small example program (only 10kb in zip file). The file contains two directories src -- with sources in one package, (this is remnants of a larger application) install -- with two further subdirectories: -> deploy -- which contains a jar file and a StartTestMenu6.bat file to execute this jar. Jar mainifest do not specify main class, so the bat file is neccessary, this jar was created with Java 5 update 6 -> scripts -- simple bat to create jar file. To observe incorrect behavior simply run the StartTestMenu6.bat (change path to java.exe before you do this) , then after the main window appears press for example Ctrl+M. That results in a message box, close it and press Ctrl+M again. Now nothing happens. REPRODUCIBILITY : This bug can be reproduced always. ---------- BEGIN SOURCE ---------- Attached seperatly ---------- END SOURCE ---------- Release Regression From : 5.0u6 The above release value was the last known release where this bug was known to work. Since then there has been a regression.
|