@Override
	protected void paintComponent(Graphics g) {
		model.flushChanges();
		repaintPosted = false;
		Point start = new Point(0, 0);
		Rectangle paintArea = new Rectangle(start, getSize());

		clearDisplay(g, paintArea);

		for (AnchoredLayout layout : layouts) {
			LayoutBackgroundColorManager colorManager = getLayoutSelectionMap(layout.getIndex());
			paintLayoutBackground(g, paintArea, layout, colorManager);

			// cusorLocation == cursorLoc when cursor is in layout, null
			// otherwise
			FieldLocation cursorLocation =
				cursorHandler.initializeCursorForLayout(layout, colorManager, paintContext);
			try {
				layout.paint(this, g, paintContext, paintArea, colorManager, cursorLocation);
			}
			catch (Exception e) {
				paintExceptionInLayout(g, paintArea, layout, e);
				break;
			}

		}
	}
Sets the layout model for this field panel

@param model the layout model to use.
Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/FieldPanel.java