RFR: 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 [v2]

Prasanta Sadhukhan psadhukhan at openjdk.org
Mon Jul 7 02:27:30 UTC 2025


> 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` called `getLaFIcon()` 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 via `UIManager.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..

Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:

  L&F run as different test

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/25907/files
  - new: https://git.openjdk.org/jdk/pull/25907/files/8d0f9887..5283fd20

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=25907&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=25907&range=00-01

  Stats: 76 lines in 1 file changed: 42 ins; 22 del; 12 mod
  Patch: https://git.openjdk.org/jdk/pull/25907.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/25907/head:pull/25907

PR: https://git.openjdk.org/jdk/pull/25907


More information about the client-libs-dev mailing list