private int getPreferredHeight(Container parent) {
		int n = parent.getComponentCount();
		int preferredHeight = 0;
		Insets insets = parent.getInsets();
		for (int i = 0; i < n; i++) {
			Component component = parent.getComponent(i);
			int height = component.getPreferredSize().height;
			preferredHeight = Math.max(preferredHeight, height);
		}
		return preferredHeight + insets.top + insets.bottom;
	}
Construct layout where first two components always have given width.
@param componentWidth the width of each of the first two components.
@param hgap the space between componennts.
Ghidra/Framework/Docking/src/main/java/docking/widgets/table/constraint/dialog/FilterPanelLayout.java