Adjusting components with the designer's context menu
If you create a design in an <code>XYLayout</code>
 or <code>null</code>
 layout and plan to convert it to <code>GridBagLayout</code>
, use the designer's context menu Align and Same Size commands before converting the layout to ensure that objects fit exactly in the rows and columns. Otherwise, the <code>GridBagLayout</code>
 might have more rows or columns than it needs.