private int getPreferredWidth(Container parent) {
		int n = parent.getComponentCount();
		int lastWidth = (n == 3) ? parent.getComponent(2).getPreferredSize().width : 0;
		Insets insets = parent.getInsets();
		return insets.left + 2 * hgap + 2 * componentWidth + lastWidth;
	}
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