RFR: 8370945: With Windows LAF, the location of a JMenuItem icon is incorrect

Daishi Tabata dtabata at openjdk.org
Wed Feb 18 08:27:49 UTC 2026


On Wed, 18 Feb 2026 07:15:06 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

> I couldn't find any native app view that will have radiobutton, checkmark and normal menuitem along with imageicon as is tested in test/jdk/javax/swing/JMenuItem/TestRadioAndCheckMenuItemWithIcon.java

There’s no normal menu item that has an ImageIcon, but I did find a native app where a radio button and an ImageIcon are displayed side by side. The screenshot is from the “View” menu in Windows 11 Explorer.

<img width="169" height="305" alt="example" src="https://github.com/user-attachments/assets/5a8983a2-160e-484f-ba8a-5cf242e8fb6e" />

The last “Show” opens a submenu, so it might be treated differently from a normal menu item, but the menu text is left-aligned.

I still think it’s not good if the ImageIcon and text of each menu item end up misaligned.

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

PR Comment: https://git.openjdk.org/jdk/pull/29730#issuecomment-3919381079


More information about the client-libs-dev mailing list