JTextComponent has modelToView() and viewToModel() methods which can be used for getting the co-ordinates (relative to the component) of a particular caret position, and vice versa. This same functionality would be useful in JavaFX but is currently lacking.