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

Alexey Ivanov aivanov at openjdk.org
Thu Jan 30 15:15:07 UTC 2025


On Thu, 30 Jan 2025 14:55:59 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

> I found one in windows11 in Explorer which seems to use both icon and bullet checkmark and the present PR do the same

Yeah, you're right, it looks similar.

Yet the currently proposed fix in this PR is still off. The bullet or check-mark should be displayed where it is now. What I mean by this is that this `if` statement needs to be removed:

https://github.com/openjdk/jdk/blob/fac63d4383c931ea515dcdf7a89e4285f753f41b/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsIconFactory.java#L878-L881

If you remove it, then the bullet or check-mark will be rendered at its own place.

Yet if there's an icon associated with a menu item, all the text in other menus should shift to make room for the added icon. (Note that this menu in File Explorer in Windows 11 has icons on each and every menu item.)

![Proposed layout for icons and bullets](https://github.com/user-attachments/assets/c3809aaa-3219-4b9a-b86e-7850a747f652)

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

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


More information about the client-libs-dev mailing list