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

Alexey Ivanov aivanov at openjdk.org
Thu Jan 30 14:59:51 UTC 2025


On Thu, 30 Jan 2025 12:49:14 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 two additional commits since the last revision:
> 
>  - Remove duke
>  - RadioButton not drawn. ImageIcon on the fly

Based on [the discussion above](https://github.com/openjdk/jdk/pull/23324#discussion_r1935589364) in relation to [JDK-6432667](https://bugs.openjdk.org/browse/JDK-6432667) where the current behaviour/rendering was implemented, this quirk may be *a feature* of Windows L&F rather than a bug.

![Windows 10 - red square item selected](https://github.com/user-attachments/assets/343adf20-b3ca-4c06-af93-e63736bce123)

Windows 10 has a highlight around the selected icon. Yet there's no such highlight in Windows 11, therefore it's hard to distinguish whether a menu item has a selected state of not.

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

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


More information about the client-libs-dev mailing list