RFR: 8348760: RadioButton is not shown if JRadioButtonMenuItem is rendered with ImageIcon in WindowsLookAndFeel [v30]
Phil Race
prr at openjdk.org
Mon Aug 11 15:54:37 UTC 2025
On Mon, 11 Aug 2025 11:59:12 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:
>> src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsMenuItemUI.java line 73:
>>
>>> 71: private static Color disabledForeground;
>>> 72: private static Color acceleratorSelectionForeground;
>>> 73: private static Color acceleratorForeground;
>>
>> Why are these needed?
>>
>> `BasicMenuItemUI` has fields for all three colors: `disabledForeground`, `acceleratorSelectionForeground`, `acceleratorForeground`. Why do you need to create three *new static* fields instead?
>
> Again this doesn't look right to me and this hasn't been resolved at all. These static variables are present in the class.
This is odd. But since the painting is single-threaded, it shouldn't matter. But this should be re-done.
Maybe I think it can wait for another day but it made me spot a bug.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23324#discussion_r2267212681
More information about the client-libs-dev
mailing list