private void paintCursor(Graphics g, Color cursorColor, RowColLocation cursorLoc) {
		if (cursorLoc == null) {
			return;
		}

		if (cursorLoc.col() < numCols) {
			g.setColor(cursorColor);
			int x = startX + metrics.stringWidth(text.substring(0, cursorLoc.col()));
			g.fillRect(x, -heightAbove, 2, heightAbove + heightBelow);
		}
	}
@see docking.widgets.fieldpanel.field.Field#isValid(int, int)
Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/field/SimpleTextField.java