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

Alexey Ivanov aivanov at openjdk.org
Thu Jan 30 13:14:47 UTC 2025


On Thu, 30 Jan 2025 11:25:20 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> I guess if we can use normal resolution image, then its best to use it than bitmap image which can be flaky..Probably, in earlier days, image icons used to come in bitmap format..
>
>> Do you happen to know why State.BITMAP was originally here?
> 
> Perhaps, because of default Windows behaviour: a bitmap menu item fully replaces the menu item text. Yet I can't be sure…

This state was added by [JDK-6432667](https://bugs.openjdk.org/browse/JDK-6432667): _Vista: Menu dropdown differs while compare with native in vista laf_.

No more background is available… It may be due to how Windows renders icons in menus: if a menu item has an icon, it's rendered at the location where bullets / check-marks are rendered; if you need to display selected / unselected state of such a menu item, you have to use different icons.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23324#discussion_r1935589364


More information about the client-libs-dev mailing list