public int getIndexAtPoint(Point p) {
		if (cursorField == null) {
			return 0;
		}
		Rectangle bounds = cursorField.getBounds();
		if (!bounds.contains(p)) {
			return -1;
		}
		Point localPoint = new Point(p.x - bounds.x, p.y - bounds.y);
		return cursorField.getIndexAtPoint(localPoint);
	}
Returns the character index at the given point relative to the FieldPanel. Note this
only returns chars in the active field.
@param p the point to get the character for
@return the character index at the given point relative to the FieldPanel.
Ghidra/Framework/Docking/src/main/java/docking/widgets/fieldpanel/AccessibleFieldPanelDelegate.java