posted 14 years ago
The API docs for GridBagConstraints explain this. For example, under weightx -
If all the weights are zero, all the extra space appears between the grids of the cell and the left and right edges.
The default value of this field is 0. weightx should be a non-negative value.