Margin « Button « Java Swing Q&A





1. Can I make Swing JButtons have smaller margins?    stackoverflow.com

I prefer buttons with minimal margins, about as wide as their text caption. Is there a way to achieve that in a JButton in Swing? What I am seeing in practice now ...

2. set margin for a group of buttons    stackoverflow.com

Is there a way to collectively change the padding of JButtons? I found the setMargin() method, but that doesn't work on button groups and I really can't imagine going through 25 ...

3. JButton margins. Not respected when nimbus plaf    stackoverflow.com

The property margin of a JButton isn't respected when the nimbus look and feel is installed.
. I need some "little" buttons, but nimbus forces the space around button text to be ...