@Override
	public void paint(JComponent c, Graphics g, int x, int y) {
		int xPos = x;
		for (FieldElement fieldElement : fieldElements) {
			fieldElement.paint(c, g, xPos, y);
			xPos += fieldElement.getStringWidth();
		}
	}
A FieldElement that is composed of other FieldElements.  The elements are laid out horizontally.
Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/field/CompositeFieldElement.java