@Override
		public void layoutsChanged(List<AnchoredLayout> layouts) {
			Set<Component> invisible = new HashSet<>(componentsByLocation.values());
			for (AnchoredLayout layout : layouts) {
				// Protect against indexing an empty array. Besides, if no fields, no components.
				if (layout.getNumFields() == 0) {
					continue;
				}
				BigInteger index = layout.getIndex();
				// Now, look over the fields and map the components.
				for (int i = 0; i < layout.getNumFields(); i++) {
					FieldLocation loc = new FieldLocation(index, i);
					Field field = layout.getField(i);
					Component comp = componentsByLocation.get(loc);
					if (comp != null) {
						Rectangle r = layout.getFieldBounds(i);
						comp.setBounds(r);

						FieldPanelOverLayoutEvent ev =
							new FieldPanelOverLayoutEvent(field, loc, comp);
						fireLayoutListeners(ev);
						if (ev.isCancelled()) {
							continue;
						}
						comp.setVisible(true);
						invisible.remove(comp);
					}
				}
			}
			for (Component comp : invisible) {
				comp.setVisible(false);
			}
		}
A listener for callbacks on the {@link FieldPanel}'s field layout changing.
Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/FieldPanelOverLayoutManager.java