I'm designing a cmd like console I want to force the caret to last line so that previous line wont be editable.
codeArea.currentParagraphProperty().addListener((obs, o, n) -> codeArea.moveTo(codeArea.getLength()));
I used the above statement to force caret to last character of CodeArea although it works when I try to reach previous line but fails to work when I press backspace as it moves caret to previous line by removing characters. I want the caret to be uneditable from current paragraph containing directory path till first line of code area
Rather than using this.
Use this code: