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

Prasanta Sadhukhan psadhukhan at openjdk.org
Fri Jun 27 03:46:43 UTC 2025


On Thu, 26 Jun 2025 14:49:16 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   MenuItem with icon fix
>
> src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsMenuItemUI.java line 234:
> 
>> 232:         }
>> 233:         return iconPresent;
>> 234:     }
> 
> This should be really simple:
> 
> 
>     private static boolean checkIfImageIconPresent(JMenuItem mi) {
>         return (mi instanceof JCheckBoxMenuItem
>                 || mi instanceof JRadioButtonMenuItem)
>                && mi.getIcon() != null;
>     }
> 
> 
> That is

Have you checked this code? It doesn't work for me

I get this whereby JRadioButtonMenuItem3 which doesnt have imageicon is not aligned..For this only, we need to know if other RBMIs have imageicon from ButtonGroup or if there any other way, let me know..

![image](https://github.com/user-attachments/assets/eb2d701e-f235-4527-9f80-e372586fc16a)

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

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


More information about the client-libs-dev mailing list