How can I set size of a button?

Posted by Roman on Stack Overflow See other posts from Stack Overflow or by Roman
Published on 2010-03-29T09:28:00Z Indexed on 2010/03/29 9:33 UTC
Read the original article Hit count: 376

Filed under:
|
|
|
|

I put my buttons in a JPane with GridLayout. Then I put JPanel into another JPanel with BoxLayout.Y_AXIS. I want buttons in the GridLayout to be square. I use tmp.setSize(30,30) and it does not work. I also try to use new GridLayout(X, Y, 4, 4) but I cannot figure out what X and Y are. So, what is the correct way to do this stuff?

© Stack Overflow or respective owner

Related posts about java

Related posts about swing