RFR: 8348760: RadioButton is not shown if JRadioButtonMenuItem is rendered with ImageIcon in WindowsLookAndFeel [v38]

Alexey Ivanov aivanov at openjdk.org
Wed Aug 6 19:21:33 UTC 2025


On Mon, 4 Aug 2025 05:31:46 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 with a new target base due to a merge or a rebase. The pull request now contains 42 commits:
> 
>  - Merge branch 'master' of https://git.openjdk.java.net/jdk into JDK-8348760
>  - Fix not needed background effect for Windows 10
>  - Remove Windows version check
>  - Merge master
>  - bullet/checkmark placement for varying imageicon size fix, test update
>  - Adjust offset for varying size imageicon
>  - squish fix
>  - Alignment fix
>  - MenuItem with icon fix
>  - Merge branch 'master' of https://git.openjdk.java.net/jdk into JDK-8348760
>  - ... and 32 more: https://git.openjdk.org/jdk/compare/57553ca1...5f51ecdc

I do not think that removing the background that Windows 10 provides is the correct way to resolve the problem.

I still think the current menu layout doesn't match what we see in Windows 11 File Explorer. If you applied the right margins between check mark / bullet column and the icon, there would be no clash that we see on Alex's screenshot from Windows 10.

Additionally, the size of the icon should not affect the size of the highlight that's still seen in Windows 10, I think it should remain 16×16 per the default size of the check mark and bullet.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/23324#issuecomment-3161309759


More information about the client-libs-dev mailing list