Get rid of wasted / unused space in JMenu

In my application, I have a menu bar with the File menu. In the submenu, each JMenuItem spends a lot of empty space to the left of the text for the checkbox (I think), even if I do not include any JCheckBoxMenuItems elements.

I see many other Java / Swing applications whose menus do not waste this place. How do I do this in my application?

Menu screen shot

+3
source share
2 answers

UIManager Look and Feel (L & F). put(), . UIManager Defaults Menu.margin L & Fs.

+1

, . , .

. " " , , . , -, , , , .

, , , .

+1

Source: https://habr.com/ru/post/1733048/


All Articles