[jdk25u-dev] RFR: 8373650: Test "javax/swing/JMenuItem/6458123/ManualBug6458123.java" fails because the check icons are not aligned properly as expected

Roland Mesde duke at openjdk.org
Wed Feb 25 11:23:19 UTC 2026


Backporting JDK-8373650: Test "javax/swing/JMenuItem/6458123/ManualBug6458123.java" fails because the check icons are not aligned properly as expected.

This PR fixes misaligned checkbox and radio button icons in Windows Look and Feel RTL (right-to-left) menus by adjusting icon positions in WindowsIconFactory to compensate for MenuItemLayoutHelper's RTL layout calculations that don't account for Windows' historical icon rendering behavior.

The test test/jdk/javax/swing/JMenuItem/6458123/ManualBug6458123.java seems to be in the closed (proprietary) repository, not the open OpenJDK repository.

For parity with Oracle JDK.

Ran a possibly related test on windows-x64 because the targeted test is not available:

../jtreg/build/images/jtreg/bin/jtreg -jdk build/windows-x86_64-server-fastdebug/images/jdk -m test/jdk/javax/swing/JMenuItem/TestRadioAndCheckMenuItemWithIcon.java

Screenshot:

<img width="917" height="493" alt="success" src="https://github.com/user-attachments/assets/bd577067-a968-4488-b0f5-5923b50e3ea9" />

Result:

[success.jtr.txt](https://github.com/user-attachments/files/25531135/success.jtr.txt)

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

Commit messages:
 - Backport e45f5656bc90421c9acb0cbf87164162039ddf81

Changes: https://git.openjdk.org/jdk25u-dev/pull/306/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk25u-dev&pr=306&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8373650
  Stats: 40 lines in 1 file changed: 36 ins; 0 del; 4 mod
  Patch: https://git.openjdk.org/jdk25u-dev/pull/306.diff
  Fetch: git fetch https://git.openjdk.org/jdk25u-dev.git pull/306/head:pull/306

PR: https://git.openjdk.org/jdk25u-dev/pull/306


More information about the jdk-updates-dev mailing list