weightx
and weighty
weightx
and weighty
fields determine how the cells are distributed in the container when the total size of the cells
is less than the size of the container. With weights of zero (the default) the cells all have the minimum size they need, and everything clumps together in the center. All the extra space is pushed to the edges of the container.