GridBagLayout fixed width for buttons

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

+4
source share
1 answer

Yes, as noted in the comments, use GridLayout.

To add an add-on, simply use the last two parameters for GridLayout (int rows, int cols, int hgap, int vgap)

+2
source

Source: https://habr.com/ru/post/1411162/


All Articles