PDA

View Full Version : JMenu-JMenuItem



raac
October 24th, 2011, 11:07 PM
Guys, I'm working on making a menu item in java, but I don't know how to make the VERTICAL separators next to the JMenuItem. The one I'm working on is the incorrect-menu picture attached, the one I want it to look like is correct-menu.

You can see a space to the left of the JMenuItem in the correct-menu picture

ofnuts
October 24th, 2011, 11:24 PM
Guys, I'm working on making a menu item in java, but I don't know how to make the VERTICAL separators next to the JMenuItem. The one I'm working on is the incorrect-menu picture attached, the one I want it to look like is correct-menu.

You can see a space to the left of the JMenuItem in the correct-menu pictureLooks like the space is there because of the icons?

raac
October 24th, 2011, 11:53 PM
Nope, check out the attached picture

t1497f35
October 25th, 2011, 01:26 AM
Looks like it's a theme feature. Also, adding say a JCheckBoxMenuItem adds space to the left of the label of all other menu items within the same JMenu.

11jmb
October 25th, 2011, 02:11 PM
As far as I know, in swing the vertical menu separators are from the icons