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

Alexey Ivanov aivanov at openjdk.org
Tue Feb 4 11:09:12 UTC 2025


On Tue, 4 Feb 2025 10:02:22 GMT, Abhishek Kumar <abhiscxk at openjdk.org> wrote:

> Why offset is multiplied by 3?

I believe this is likely how layout is calculated.

> Buffered Image in test code is of size 16x16. Is it possible that the icon can be of different size?

It's definitely possible… Yet it's pretty common to use 16×16 (small) icons in menus.

This question is applicable to other L&Fs, yet the problem could be more prominent in Windows L&F.

> does it depend on the icon size?
> If Icon size is more then I guess it may overlap with radio button skin.

This is why we should re-work the layout of menus with icons if there's any radio- or check-menu item as I [suggested above](https://github.com/openjdk/jdk/pull/23324#discussion_r1935784688).

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

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


More information about the client-libs-dev mailing list