private void createImage() {

			if (baseTextImage != null) {
				return;
			}

			Font font = Gui.getFont(FONT_ID);
			BufferedImage tempImage = new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB);
			Graphics2D scratchG2d = (Graphics2D) tempImage.getGraphics();

			scratchG2d.setFont(font);
			Dimension size = getComponentSize();
			int padding = 20;
			size.width -= padding;
			TextShaper textShaper = new TextShaper(message, size, scratchG2d);

			Dimension textSize = textShaper.getTextSize();
			if (textSize.width == 0 || textSize.height == 0) {
				return; // not enough room to paint text
			}

			// Add some space to handle float to int rounding in the text calculation. This prevents
			// the edge of characters from getting clipped when painting.
			int roundingPadding = 5;
			int w = textSize.width + roundingPadding;
			int h = textSize.height;

			BufferedImage bi = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);
			Graphics2D g2d = (Graphics2D) bi.getGraphics();
			g2d.setFont(font);
			g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
				RenderingHints.VALUE_ANTIALIAS_ON);

			g2d.setColor(Gui.getColor(MESSAGE_FG_COLOR_ID));

			textShaper.drawText(g2d);

			g2d.dispose();

			baseTextImage = bi;
		}
Hides any message being displayed.  This can be called even if the message has been hidden.
Ghidra/Framework/Docking/src/main/java/docking/util/GGlassPaneMessage.java