Scott
Scott

Reputation: 3

automatic resizing of jbutton icon in gridlayout

I'm making a chess game. I'm using a gridLayout(8,8) and filled it with a JButton[8][8]. Each JButton has an icon of the piece on that square or an icon of a blank square if no piece is on it. Right now the pieces get cut off. How do I make it so that the icons automatically resize themselves to fit whatever size the grid makes the JButton?

Upvotes: 0

Views: 594

Answers (1)

camickr
camickr

Reputation: 324147

You might be able to use Darryl's Stretch Icon.

Upvotes: 1

Related Questions