private void buildLegend() {
		removeAll();
		AddressType[] values = AddressType.values();
		for (AddressType addressType : values) {
			JPanel panel = new ColorPanel(addressType);
			add(panel);
			add(new GLabel(addressType.getDescription()));
		}
	}
Kick to repaint when the colors have changed.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/overview/addresstype/AddressTypeOverviewLegendPanel.java