Welcome to the Ranch
Can you get your hands on a copy of
Core Java II by Horstmann and Cornell. Find about Horstmann's GBC class, and read about that. There is a bit about GBC
here. There are various tutorials about Grid Bag; try
here in the Java® Tutorials.
Basically, you use the constraints object to specify things like xPos yPos (which columns and rows you start your Component off in) height and width (how many columns and rows it spans) etc. There are 11 fields which a constraints object has. If I remember correctly they are
xPos = column number starting 0 = far left
yPos = row number starting 0 = top
width
height
weightX and weightY: how much they change size in those directions as the
anchor: whether your Component is fixed to a particular corner of its space
fill: whether your Component fills the space available
insets (top, left, bottom and right): space to be left on those sides between the Component and the area it occupies (measured in pixels)
internal padding (X and Y) measured in pixels: a minimum size smaller than which your Component is not supposed to go.
There are alternatives:
Divide your space into smaller spaces by putting several JPanels on it. Each can have its own instance of layouts.Find out about MigLayout. I have never used it bu people say it is very good.
We usually discuss such questions in a different location, so I shall move you thither. I see you have already been moved.