@Override
	public void paint(JComponent c, Graphics g, PaintContext context,
			Rectangle clip, FieldBackgroundColorManager colorManager, RowColLocation cursorLoc, int rowHeight) {
		paintSelection(g, colorManager, 0);
		paintHighlights(g, hlFactory.createHighlights(this, text, -1));
		g.setFont(metrics.getFont());
		if (foregroundColor == null) {
			foregroundColor = context.getForeground();
		}

		g.setColor(foregroundColor);
		GraphicsUtils.drawString(c, g, text, startX, 0);

		Color cursorColor = context.getCursorColor();
		paintCursor(c, g, cursorColor, cursorLoc, context.cursorHidden());
	}
Constructor
@param text the text value to display
@param fontMetrics the font to use to display the text.
@param startX the starting horizontal position of the field.
@param startY the starting vertical position of the field.
@param width the width of the field.
@param allowCursorAtEnd if true, the cursor will be allowed at the end of the field.
@param fieldOffset the column position of the fieldFactory that generated this field.
@param index the field's index
@param hlFactory the factory used to create highlights
Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/byteviewer/ByteField.java