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

Prasanta Sadhukhan psadhukhan at openjdk.org
Fri Feb 7 05:31:12 UTC 2025


On Fri, 7 Feb 2025 05:26:10 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 test file
>  - Move text position w.r.t menuItem icon

It seems in windows 11, the menuitem text location is dependant on presence of menuitem icon. As per this screenshot, the bullet/checkmark seems to be in its fixed location but text is shifted depending on menuitem icon.

![image](https://github.com/user-attachments/assets/6b6e4570-8f3b-41f3-a200-4d9362321e8d)

![image](https://github.com/user-attachments/assets/f26a71f4-d6e2-4848-9c48-27c3f40f763e)

Modified the PR to look the same.

![image](https://github.com/user-attachments/assets/7d636add-f336-4db3-96cd-d8fe06737b3a)

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

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


More information about the client-libs-dev mailing list