How to make square (same width & height) buttons
807601May 14 2008 — edited May 15 2008I'm making a grid of JButtons and I want the buttons to be square (same width and height). I've tried setPreferredSize and setMinimumSize. I can adjust the Dimension object given to setPreferredSize so I get what looks like square buttons in a 4x4 grid but if I then change to a 10 x 10 grid the buttons are no longer square. Any advice would be appreciated.