Adding spacing between elements in JMenuBar
Yes, just add MenuBar item with empty text in it and make it not clickable/selectable
required to add JComponents
that aren't focusable
, you can create an space for
JMenuBar
JLabel
(have to set for requiredPreferredSize
)JSeparator
(minimus size is 10pixels, have tosetOpaque
forJSeparator
)
JMenuItem
JSeparator
(no additional settings required)JLabel
(have to set for requiredPreferredSize
)