Does GridLayout ever not honor the number of rows and columns you’ve specified if you don’t fill it completely?
I’m creating a GridLayout with 3 rows and 4 columns. However, I’m only adding 9 components. It ends up showing me these 9 components in a 3×3 grid, rather than a 3×4 grid (with only 1 component on the third row (and two blanks)).
Just fill empty cells with empty items (like a
JLabel), eg:This layouts them as