Is there any way to force GridLayout to leave empty cells?
I have a JTabbedPane with 2 JPanels set to GridLayout(13, 11). The first JPanel has enough of the cells filled out that it leaves the empty cells. The second JPanel has significantly fewer cells filled and this results in each button getting stretched to fill an entire row. Is there any way to get GridLayout to honor the empty cells, so the buttons in both JPanels are the same size? Paul Samsotha Use nested layouts to get your desired result. Some layouts respect the preferred size of components and some don't. GridLayout is one of the ones that don't. Have a look at this answer to see which