@Override
	protected void paintComponent(Graphics g) {

		Graphics2D g2d = (Graphics2D) g;
		Composite oldComposite = g2d.getComposite();

		try {
			AlphaComposite alpha =
				AlphaComposite.getInstance(AlphaComposite.SrcOver.getRule(), transparency);
			g2d.setComposite(alpha);

			super.paintComponent(g);
		}
		finally {
			g2d.setComposite(oldComposite);
		}
	}
A label that displays an icon that, when clicked, will clear the contents of the 
associated filter.
Ghidra/Framework/Docking/src/main/java/docking/widgets/filter/ClearFilterLabel.java