[jdk25u-dev] RFR: 8374506: Incorrect positioning of arrow icon in parent JMenu in Windows L&F

Roland Mesde duke at openjdk.org
Wed Feb 25 11:26:46 UTC 2026


Backporting JDK-8374506: Incorrect positioning of arrow icon in parent JMenu in Windows L&F.

This PR fixes the submenu arrow icon overlapping with long menu text in Windows L&F by adding a gap for the arrow icon rect, though reviewers note it's a stopgap solution and the underlying menu width calculation issue remains unaddressed.

For parity with Oracle JDK.

Ran related tests on windows-x64:

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

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

Commit messages:
 - Backport 9a10cceeafa5d332aa571f0d62acf50032a597d4

Changes: https://git.openjdk.org/jdk25u-dev/pull/311/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk25u-dev&pr=311&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8374506
  Stats: 102 lines in 2 files changed: 101 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk25u-dev/pull/311.diff
  Fetch: git fetch https://git.openjdk.org/jdk25u-dev.git pull/311/head:pull/311

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


More information about the jdk-updates-dev mailing list