@Override
	public void paintComponent(Graphics g) {
		super.paintComponent(g);

		if (getText().isEmpty()) {
			if (g instanceof Graphics2D) {
				Graphics2D g2 = (Graphics2D) g;
				g2.setColor(Messages.HINT);
				g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
					RenderingHints.VALUE_ANTIALIAS_ON);

				if (hint != null) {
					g2.drawString(hint, 5, 12);
				}
			}
		}
	}
Need to override the setText method so we can set formatting attributes.

@param text the text
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/instructionsearch/ui/HintTextArea.java