jadrijan
jadrijan

Reputation: 1446

GridBagLayout fixed widths for buttons

Is it possible to have fixed sizes (widths) for buttons in a GridBagLayout, so that they are all the same size always? Thank you

Upvotes: 4

Views: 650

Answers (1)

David Navarre
David Navarre

Reputation: 1022

Yes, as noted in comments, use GridLayout.

To add padding, just use the last two parameters for GridLayout(int rows, int cols, int hgap, int vgap)

Upvotes: 2

Related Questions