JavaFX: TextArea cursor moves back to the first line on new text
问题 I'm having a hard time with TextArea 's cursor, it keeps being set to position 0 in the first line, after adding new text to the Textarea . Problem Background I have a Textarea , when I add enough text a scroll bar appears to put the new text below the old one. Until here everything is OK, however, the cursor in the TextArea comes back to the top which becomes annoying when I have frequent insertions to the TextArea . Here is how I add the new line each time: void writeLog(String str) {