Working caret navigation in java fx