This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
you tell the GridLayout layout manager that you want two rows and two columns. It is expecting to be handed 2 x 2 = 4 components to layout in this 2 x 2 grid. When you hand it 8 components it tries to put them in 2 rows... Check the last paragraph in the GridLayout api for the explanation.
From this explanation, a common practice that is used in GridLayout is to specify either rows or cols and let the layout manager use the (unspecified) number of rows or cols it needs. If I want only two columns I can do: