GridBagLayout panels alignment
I have a little issue with the GridBag Layout Manager. I am trying to display 9 panels like this: To do so, I separated the Grid like this: For the panels 1 to 7 there is no problem, they show up just as I want. But the issue starts with the panels S8 and S9 . As you can see, the S8 and S9 takes up half the frame, but I can't make it display like this. The S8 ends at the start of S4 , and the S9 begins at the end of S4 , I cannot handle the half space. Only way I figured out is to put the S8 and S9 panel in another panel which takes all the frame width - but surely there must be a proper way