i am trying to add Separate between the JMenuBar
and JToolBar
because it's coming like their are no space between JMenuBar
and JToolBar
for example can i make JToolBar
bold or something
JPanel addTable = new JPanel(new BorderLayout());
addTable.add(table,BorderLayout.NORTH);
addTable.add(toolbar, BorderLayout.NORTH);
Container cp=getContentPane();
cp.add(addTable);
You can use a
MatteBorder
for theJToolBar
and just set the top edgeThis will give you a line on top of the tool bar, one pixel color black
Disregard the complete image. Its just some code I had handy with a menu bar in it.
Notice the line at the top of the toolbar to give more distinction in separation. You can play around with the pixel thickness and color. If you want it a little more subtle, tou can use a color like light_gray or gray. Your choice
See MatteBorder javadoc