@Override
	public void paint(Graphics g) {

		int x, y;
		Dimension d = this.getSize();
//		g.clearRect(0, 0, d.width, d.height);

		y = line_ascent + (d.height - num_lines * line_height) / 2;
		for (int i = 0; i < num_lines; i++, y += line_height) {
			switch (alignment) {
				case LEFT:
					x = margin_width;
					break;
				case CENTER:
				default:
					x = (d.width - line_widths[i]) / 2;
					break;
				case RIGHT:
					x = d.width - margin_width - line_widths[i];
					break;

			}
			GraphicsUtils.drawString(this, g, lines[i], x, y);
		}
	}
This method draws label (applets use same method).
Note that it handles the margins and the alignment, but
that is does not have to worry about the color or font --
the superclass takes care of setting those in the Graphics
object we've passed.
@param g the graphics context to paint with.
Ghidra/Framework/Docking/src/main/java/docking/widgets/MultiLineLabel.java