Dimension () { int width = getDividerWidth() * 2; int height = 0; for (JComponent content : myContents) { Dimension size = content.getMinimumSize(); width += size.width; height = Math.max(height, size.height); } return new Dimension(width, height); }