RFR: 8348760: RadioButton is not shown if JRadioButtonMenuItem is rendered with ImageIcon in WindowsLookAndFeel [v9]
Alexey Ivanov
aivanov at openjdk.org
Thu Feb 6 18:16:14 UTC 2025
On Tue, 4 Feb 2025 14:16:16 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:
>> When JRadioButtonMenuItem is called with imageIcon, then only imageIcon is shown without radiobutton in WIndowsLookAndFeel as there was no provision of drawing the radiobutton alongside icon.
>> If icon is not there, the radiobutton is drawn. Added provision of drawing the radiobutton windows Skin even when imageIcon is present.
>
> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
>
> retain diff of OFFSET between skin background start coord and skin coordinate
On that note, Swing's menu rendering doesn't blend with the way Windows 11 renders menus:
1. Menu has rounded corners,
2. The highlight color is just slightly darked than the menu background,
3. The highlight rectangle also has rounded.

This is out of scope of this issue, I just wanted to bring it up. I guess I should submit a bug against this, it would be more relevant as support for Windows 10 is phased out. Swing uses the theming API to paint menus, yet it differs now.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23324#issuecomment-2640637956
More information about the client-libs-dev
mailing list