@Override
	public int getX(int row, int col) {
		int x = 0;
		if (col < text.length()) {
			x = metrics.stringWidth(text.substring(0, col));
		}
		else {
			x = metrics.stringWidth(text);
		}
		return startX + x;
	}
@see docking.widgets.fieldpanel.field.Field#getX(int, int)
Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/field/SimpleTextField.java