@Override
	public Dimension preferredLayoutSize(Container container) {
		Component[] comps = container.getComponents();
		int maxWidth = 0;
		int maxHeight = 0;
		for (int i = 0; i < comps.length; i++) {
			Dimension size = new Dimension(comps[i].getPreferredSize());
			maxWidth = Math.max(maxWidth, size.width);
			maxHeight = Math.max(maxHeight, size.height);
		}
		Insets insets = container.getInsets();
		return new Dimension(maxWidth + insets.left + insets.right,
			maxHeight + insets.top + insets.bottom);

	}
@see java.awt.LayoutManager#preferredLayoutSize(java.awt.Container)
Ghidra/Framework/Gui/src/main/java/ghidra/util/layout/StretchLayout.java