Then Listing 3 sets the layout to GridLayout.
This controls how the components that are placed in the panel will be arranged.
A GridLayout causes