I want to make with swing this interface:

![enter image description here](https://i.stack.imgur.com/9NRRI.png) 

And when I resise it I want all the subpanels and buttons to be resized like this: ![enter image description here](https://i.stack.imgur.com/pjuCR.png) 

Not only main window to be resized. I am using GridBagLayout. And I dont know how to stick the borders of the panel with GridBagLayout to the borders of the Frame in that way, when I am resizing the frame the panel also to be resized.