-
Bug
-
Resolution: Unresolved
-
P3
-
26
-
b11
-
windows
After JDK-8348760, the accelerator colors are cached in static fields of WindowsMenuItemUI [1][2]. If these colors are customised in UIManager, the colors aren't updated after any of them is set to a non-UIResource value.
To reproduce the problem, run the attached jtreg test MenuItemAcceleratorColor.java. (Put it into test/jdk/com/sun/java/swing/plaf/windows/MenuItem.)
In Windows Look and Feel, all the accelerators are green and red when selected. BeforeJDK-8348760, the first and the last menu items use the default accelerator color which matches the menu text color; the second item renders its accelerator in green and red, and the third one uses magenta and yellow.
Windows Classic Look and Feel isn't affected, it renders correctly because rendering is handled by the super class, namely BasicMenuItemUI.
[1] https://github.com/openjdk/jdk/blob/b69a3849b21b4bb1e21ad276633de45da6200168/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsMenuItemUI.java#L137-L156
[2] https://github.com/openjdk/jdk/blob/b69a3849b21b4bb1e21ad276633de45da6200168/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsMenuItemUI.java#L70-L72
To reproduce the problem, run the attached jtreg test MenuItemAcceleratorColor.java. (Put it into test/jdk/com/sun/java/swing/plaf/windows/MenuItem.)
In Windows Look and Feel, all the accelerators are green and red when selected. Before
Windows Classic Look and Feel isn't affected, it renders correctly because rendering is handled by the super class, namely BasicMenuItemUI.
[1] https://github.com/openjdk/jdk/blob/b69a3849b21b4bb1e21ad276633de45da6200168/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsMenuItemUI.java#L137-L156
[2] https://github.com/openjdk/jdk/blob/b69a3849b21b4bb1e21ad276633de45da6200168/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsMenuItemUI.java#L70-L72
- caused by
-
JDK-8348760 RadioButton is not shown if JRadioButtonMenuItem is rendered with ImageIcon in WindowsLookAndFeel
-
- Resolved
-