Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Skip a row GridBagLayout

I'm using the GridBagLayout on a JFrame and I'd like to be able to skip a row or two but have those rows show up as blank, and then have a button after those rows. I can't find any way in the documentation to do what I described, does anyone know of any way I can do this?

like image 662
justanother1 Avatar asked May 14 '26 18:05

justanother1


1 Answers

Figured it out much cleaner than adding empty components... there is a GridBagConstraint named insets that allows you to choose the white-space between the component you're adding and the other components around it in any direction. Thanks for the answers though!

like image 197
justanother1 Avatar answered May 17 '26 07:05

justanother1