Text on JButton

I have text on Jbutton , and button prefered size is Dimension(45,45).But when I change Dimension to (20,20) text become "...". what should I do to see text on Jbutton with Dimension(20,20). My text is one character lenght.Help!!!!!
[253 byte] By [seha_05a] at [2007-11-27 7:10:54]
# 1
Well, first, are you sure your text is one character in length? Are you setting it explicitly or are you retreaving it from somewhere? Because if that's the case, you may need to use a .trim() to get rid of extra blank characters.
JacobsBa at 2007-7-12 19:02:28 > top of Java-index,Desktop,Core GUI APIs...
# 2
100% sure. I make minesweeper game, and I have number of mines around button as text. I set prefered size Dimenzion(20,20) but Text apears as "...".
seha_05a at 2007-7-12 19:02:28 > top of Java-index,Desktop,Core GUI APIs...
# 3
A button will show the trailing dots (...) when the size of the button is not sufficient to display all the text. This is the expected behavior and to avoid this, improve the layout / or don't resize the button.
watfora at 2007-7-12 19:02:28 > top of Java-index,Desktop,Core GUI APIs...
# 4
i believe you can use setMargin to change the distance between the text and the button border.or you may want to consider using an icon representation of the number.Message was edited by: JacobsB
JacobsBa at 2007-7-12 19:02:28 > top of Java-index,Desktop,Core GUI APIs...
# 5
Thank JacobsB very much.Message was edited by: seha_05
seha_05a at 2007-7-12 19:02:28 > top of Java-index,Desktop,Core GUI APIs...
# 6
glad i could helpMessage was edited by: JacobsB
JacobsBa at 2007-7-12 19:02:28 > top of Java-index,Desktop,Core GUI APIs...