Link to home
Start Free TrialLog in
Avatar of harlanhugh
harlanhugh

asked on

Spacing between JToolbar buttons

How do you adjust the spacing between buttons on a JToolbar?

I can add separators or empty components between sets of buttons to space them appart, but how can I get the buttons closer to each other?
ASKER CERTIFIED SOLUTION
Avatar of jcoombes
jcoombes
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of harlanhugh
harlanhugh

ASKER

Yes, I thought of that and I even looked at the LayoutManager defined inside of JToolBar, but I thought there must be an easier way...
SOLUTION
Avatar of Mayank S
Mayank S
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I figured out the problem. The default toolbar layout puts things right next to each other, so there is no need for a way to get them closer as per my original question. My problem was that my buttons had an empty (invisible) border on the left and right of them. Removed the border and all is well.

Splitting points between mayankeagle and jcoombes for responding.