apache / apache/netbeans

Windows-Default LAF has strange offset in PopupMenus

Open
#5,697 5 comments 0 reactions 0 assignees View on GitHub
Contribution welcome kind:bug Look and Feel os:windows
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

### Apache NetBeans version

Apache NetBeans 17

### What happened

Using the LAF "Windows" causes PopupMenus to have strange x-Offsets for every MenuItem. This seems to happen on every type of menu like the Toolbar-Menu of NetBeans itself but also for every JMenuItem in a JPopupMenu used in a NetBeans Platform Application.

I made a Screenshot in NetBeans highlighting the resulting gab:
![image](https://user-images.githubusercontent.com/122348235/226842410-507333dd-ead1-47a4-ac4f-5b6c6f8ca7b9.png)

This does not happen on other LAF implementations like Flat LAF.

### How to reproduce

1. Activate LAF "Windows" through Tools --> Options --> Appearance --> Look and Feel --> Prefered Look and Feel
2. Reboot NetBeans
3. Open any Toolbar Menus

### Did this work correctly in an earlier version?

No / Don't know

### Operating System

Windows 10 (22H2 Build 19045.2364)

### JDK

11

### Apache NetBeans packaging

Apache NetBeans provided installer, Apache NetBeans binary zip, Apache NetBeans platform

### Anything else

_No response_

### Are you willing to submit a pull request?

No

**Update**
I stated, that Windows LAF was the default LAF, but that's not correct.

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue in Apache NetBeans 17 on Windows 10 with the Windows Look and Feel enabled, following the listed Tools → Options steps and opening a toolbar menu. Inspect the Windows Look and Feel popup-menu handling, since no source file or test is named. Done means JMenuItems no longer show the reported horizontal gaps or offsets in NetBeans menus and platform application popup menus.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.