Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Resizing JButton's in swing/awt

843804Jul 25 2005 — edited Jul 25 2005
Hi, I am trying to create a monopoly board in java. So far I have created the board using the following technique. I put a borderlayout on the main panel, then gridlayouts on the outside panes in order to have to 10 spaces along each edge of the board (each space being a JButton). My problem is that these JButtons are not all perfect squares. I have tried using the setSize() method and the resize() method (now deprecated) but they do nothing. The code will compile and run fine but the JButtons still remain the same squished rectangles. Any help on how I can turn these into perfect squares?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 22 2005
Added on Jul 25 2005
4 comments
584 views