-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
-
6u1
-
x86
-
windows_xp
J2SE Version (please include all output from java -version flag):
java version "1.6.0_01-ea"
Java(TM) SE Runtime Environment (build 1.6.0_01-ea-b02)
Java HotSpot(TM) Client VM (build 1.6.0_01-ea-b02, mixed mode)
Does this problem occur on J2SE 1.4.x or 5.0.x ? Yes / No (pick one)
Probably
Operating System Configuration Information (be specific):
Windows XP PRO SP2
IE 7.0
Hardware Configuration Information (be specific):
Sony VIAO laptop 2.8 Gz
1.25 GB RAM
Bug Description:
On windows, the accelerator text in a menu for ',' is "Comma". The accelerator text for '[' is "Open Bracket". This looks weird. However, this is not really overrideable.
In BasicMenuItemUI, the accelerator text is figured out *twice*, once in getPreferredMenuItemSize() and once in paintMenuItem(). If this was encapsulated in a method, [protected String getAcceleratorText(...)], then it could be easily overridden to return something different for these.
As it is now, this is deep within other methods and to override it would involve a lot of copying from BasicMenuItemUI. Also, the text comes from Toolkit.getProperty("AWT.comma", "Comma") in KeyEvent; also not easily overridden.
It seems that the best recourse is to never use any of these keys for accelerator keys since they don't look right in the menu.
I am surprised that no one else has had a problem with this. The only things like this I could find are mainly for JDK 1.2
Steps to Reproduce (be specific):
Create an AbstractAction with an ACCELERATOR_KEY and add it to a menuAcce
java version "1.6.0_01-ea"
Java(TM) SE Runtime Environment (build 1.6.0_01-ea-b02)
Java HotSpot(TM) Client VM (build 1.6.0_01-ea-b02, mixed mode)
Does this problem occur on J2SE 1.4.x or 5.0.x ? Yes / No (pick one)
Probably
Operating System Configuration Information (be specific):
Windows XP PRO SP2
IE 7.0
Hardware Configuration Information (be specific):
Sony VIAO laptop 2.8 Gz
1.25 GB RAM
Bug Description:
On windows, the accelerator text in a menu for ',' is "Comma". The accelerator text for '[' is "Open Bracket". This looks weird. However, this is not really overrideable.
In BasicMenuItemUI, the accelerator text is figured out *twice*, once in getPreferredMenuItemSize() and once in paintMenuItem(). If this was encapsulated in a method, [protected String getAcceleratorText(...)], then it could be easily overridden to return something different for these.
As it is now, this is deep within other methods and to override it would involve a lot of copying from BasicMenuItemUI. Also, the text comes from Toolkit.getProperty("AWT.comma", "Comma") in KeyEvent; also not easily overridden.
It seems that the best recourse is to never use any of these keys for accelerator keys since they don't look right in the menu.
I am surprised that no one else has had a problem with this. The only things like this I could find are mainly for JDK 1.2
Steps to Reproduce (be specific):
Create an AbstractAction with an ACCELERATOR_KEY and add it to a menuAcce