8346753: Test javax/swing/JMenuItem/RightLeftOrientation/RightLeftOrientation.java fails on Windows Server 2025 x64 because the icons of RBMenuItem and CBMenuItem are not visible in Nimbus LookAndFeel #25907
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue is RadioButtonMenuItem and CheckBoxMenuItem bullet/checkmark icon is not displayed in WindowsL&F when the test is run with NimbusL&F.
This is because
WindowsIconFactory#VistaMenuItemCheckIcon.paintIcon
calledgetLaFIcon()
which returns a empty NimbusIcon which causes no icons to be drawn. This is because the test after setting WIndows L&F of the menuitem reverts back the Windows L&F to Nimbus L&F viaUIManager.setLookAndFeel(save);
call in the test so when frame is made visible, the L&F resets back to Nimbus L&F resulting in null NimbusIcon.Fix is made to make sure the whole frame is updated to cater to L&F change via
SwingUtilities.updateComponentTreeUI(frame);
call and keep the L&F without reverting back to original L&F..Progress
Issue
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/25907/head:pull/25907
$ git checkout pull/25907
Update a local copy of the PR:
$ git checkout pull/25907
$ git pull https://git.openjdk.org/jdk.git pull/25907/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 25907
View PR using the GUI difftool:
$ git pr show -t 25907
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/25907.diff
Using Webrev
Link to Webrev Comment