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

Prasanta Sadhukhan psadhukhan at openjdk.org
Fri Mar 7 03:01:59 UTC 2025


On Wed, 5 Mar 2025 03:13:32 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 one additional commit since the last revision:
> 
>   Review comment fix

(1) I will add the evaluation in the JBS
(2) Yes, as pointed out already this is a Windows 10 vs Windows 11 issue...WIndows 10 imageicon is drawn on top of bullet/checkmark whereas in Windows 11 it is drawn alongside and I have fixed Windows 11 to look like FileExplorer->View 

![410771901-7d636add-f336-4db3-96cd-d8fe06737b3a](https://github.com/user-attachments/assets/32ab1845-696d-49eb-b73c-af7441e5b78f)

> Putting a check for Windows L&F in a BasicUI class ??  Isn't there a Windows L&F sub-class we can do this in ??

(3) The only way we could do that in Windows L&F class would require a CSR and it is done in this [commit](https://openjdk.github.io/cr/?repo=jdk&pr=23324&range=14) but I reverted back because of CSR requirement

(4) The current fix ensures Windows 10 will continue to work and also fixes Windows 11

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

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


More information about the client-libs-dev mailing list