In the above image the left shows code for the set of 4 seats in yellow on the left. I tried to change the font size to try to make it fit in the box but I can't get them to show up. For now the text on the JButtons are all "..." but I want them to display their labels, which are only 3 characters. What can I do to the JButtons to get them to display the labels? Perhaps removing the JButton border space?
Asked
Active
Viewed 209 times
0
-
Make use of appropriate layout managers, see [Laying Out Components Within a Container](http://docs.oracle.com/javase/tutorial/uiswing/layout/index.html) for more details. Use `JFrame#pack` instead of `JFrame#setSize` – MadProgrammer Nov 24 '15 at 23:41
-
Something like [this](http://stackoverflow.com/questions/33227532/spacing-between-columns-of-jbuttons/33227603#33227603) for example – MadProgrammer Nov 24 '15 at 23:43
-
Would it be possible to eliminate the thick border around the text (left and right)? Maybe that could free up some space to see the text. – btrballin Nov 24 '15 at 23:53
-
Maybe if you actually let the layout managers do there jobs correctly, you wouldn't be having issues – MadProgrammer Nov 24 '15 at 23:57
1 Answers
3
Would it be possible to eliminate the thick border around the text (left and right)?
The margin controls the space between the text and the Border:
seats[I].setMargin( new Insets(5, 5, 5, 5) );
Also, in the future post actual code, not a picture of the code. And the code should be in the form of a SSCCE so we know exactly what your are doing.

camickr
- 321,443
- 19
- 166
- 288