private void updatePreviewLabel(Font font) {
			previewLabel.setFont(font);
			FontMetrics fm = previewLabel.getFontMetrics(font);
			int height = fm.getHeight();
			Dimension d = previewLabel.getSize();
			if (d.height < height) {
				d = new Dimension(d.width, height);
				previewLabel.setPreferredSize(d);
			}
			previewLabel.invalidate();

		}
Property Editor for editing {@link Font}s
Ghidra/Framework/Docking/src/main/java/docking/options/editor/FontPropertyEditor.java