RFR: 8348760: RadioButton is not shown if JRadioButtonMenuItem is rendered with ImageIcon in WindowsLookAndFeel [v29]
Alexey Ivanov
aivanov at openjdk.org
Tue Aug 12 12:11:29 UTC 2025
On Tue, 12 Aug 2025 11:55:29 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:
>> I don't see the real code that you're referring to, but I strongly believe you can pass these colors as parameters.
>>
>> `WindowsMenuItemUI.paintMenuItem` isn't static and it has access to all the required colors inherited from `BasicMenuItemUI`, it calls a static method `paintMenuItem` as already passes background and foreground as parameters, therefore you could've added more parameters if they were needed.
>>
>> One way or another, you call these static methods from a non-static method — pass all the required parameters, maybe the `WindowsMenuItemUI` object itself to the static methods.
>
> Unless there is a functional regression as a result (as there was for the copy/paste error), given that it is very late in the release cycle for jdk25, I strongly recommend any additional refactoring be done in a follow-up bug for JDK 26 where it can be discussed and done without the pressure of a deadline.
@kevinrushforth I'm not suggesting fixing this right away—now—under the pressure.
I think these issues should've been resolved before integrating this fix.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23324#discussion_r2269633677
More information about the client-libs-dev
mailing list