Originally posted by Praveen:
Anwser is E. I have run the code and verified it. The GridLayout Managers ignores the components preferred size. So when you have components fewer than the cells(parent Layout) it behaves strangely.
You're essentially adding one component (a panel) to a Frame that can hold three components in a GridLayout. In these situations, the contract behavior for GridLayout is to reduce the column count. If you were adding more components than dedicated slots, the contract behavior is to add to the column count. Nothing strange about it. Rows before columns.