[jdk11u] RFR: 8348760: RadioButton is not shown if JRadioButtonMenuItem is rendered with ImageIcon in WindowsLookAndFeel [v2]
Severin Gehwolf
sgehwolf at openjdk.org
Mon Sep 15 15:15:04 UTC 2025
On Wed, 10 Sep 2025 14:29:46 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:
>
> Backport 3758e584e70c230e8d0294b4e9e7723ae2ed0a13
It looks like this backport silently introduces [JDK-8216329](https://bugs.openjdk.org/browse/JDK-8216329). It may make sense to do this backport first and then base this one on that version.
src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsMenuItemUI.java line 133:
> 131: menuItem.addPropertyChangeListener(changeListener);
> 132: }
> 133:
These are changes not in the JDK 17 backport. Are these needed? If so, we need to decide how to bring those in. In JDK 17 those seem to have been introduced with https://bugs.openjdk.org/browse/JDK-8216329 (also in 11.0.30-oracle).
src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsMenuItemUI.java line 165:
> 163: }
> 164: changeListener = null;
> 165: }
Also something that's unique to this JDK 11 backport (as compared to the JDK 17u version). Also brought in by [JDK-8216329](https://bugs.openjdk.org/browse/JDK-8216329)
-------------
Changes requested by sgehwolf (Reviewer).
PR Review: https://git.openjdk.org/jdk11u/pull/104#pullrequestreview-3225121424
PR Review Comment: https://git.openjdk.org/jdk11u/pull/104#discussion_r2349316413
PR Review Comment: https://git.openjdk.org/jdk11u/pull/104#discussion_r2349327370
More information about the jdk-updates-dev
mailing list