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

Andrew John Hughes andrew at openjdk.org
Thu Sep 18 23:05:59 UTC 2025


On Tue, 16 Sep 2025 07:44:59 GMT, Antonio Vieiro <avieiro at openjdk.org> wrote:

>> Backport of [JDK-8348760](https://bugs.openjdk.org/browse/JDK-8348760)  (P1 - CPU25_10-critical-approved) that properly renders `JRadioButtonMenuItem`s with `ImageIcon`s in the Windows Look and Feel. 
>> 
>> Mostly clean but for copyright issues, also the multi-line string in `test/jdk/javax/swing/JMenuItem/TestRadioAndCheckMenuItemWithIcon.java` was replaced with string concatenation.
>> 
>> The issue is reproducible in OpenJDK 11 with the Windows Look and Feel on Windows 11.
>> 
>> - Passes `tier1` tests on all platforms.
>> - Passes the new (manual) test on Windows 11/x86_64 (24H2/26100.6584)
>> - SwingSet2 looks normal (tested with Windows Look And Feel and the Windows Classic Look and Feel)
>> 
>> NOTE: Related issues [JDK-8365375](https://bugs.openjdk.org/browse/JDK-8365375), [JDK-8365389](https://bugs.openjdk.org/browse/JDK-8365389)  and [JDK-8365625](https://bugs.openjdk.org/browse/JDK-8365625) (all P3) will also need to be backported.
>
> Antonio Vieiro has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Drop JDK-8216329 chunks from WindowsMenuItemUI.java

I'm still seeing changes in `WindowsMenuItemUI.java` that are not part of the 17u patch, namely:
* Rewriting of all the `import` statements which seems unnecessary
* Removal of documentation
* Addition of an unused variable `changeListener`

`WindowsRadioButtonMenuItemUI.java` also seems to include `import` changes that are unnecessary. Did it not compile with a complete rewrite?

Can we please just include the changes from the backport? This is two methods - `installDefaults` and `applyInsets` and three new variables. Most of the new imports in the 17u version should already be covered by the wildcards in the 11u version.

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

Changes requested by andrew (Reviewer).

PR Review: https://git.openjdk.org/jdk11u/pull/104#pullrequestreview-3242307899


More information about the jdk-updates-dev mailing list