setCaretPosition to the end of the text.
myPane.setCaretPosition(myPane.getText.length());

Signature
Thomas A. Russ, USC/Information Sciences Institute
> setCaretPosition to the end of the text.
>
> myPane.setCaretPosition(myPane.getText.length());
>
> --
> Thomas A. Russ, USC/Information Sciences Institute
OK I found it. However the solution here was to use
setCaretPosition(getDocument().getLength());
instead.
setCaretPosition(getText().length()); //IllegalArgumentException (bad
position)
Don't know why though...
Karsten
Karsten Wutzke - 22 Mar 2008 10:24 GMT
> > setCaretPosition to the end of the text.
snip
> Don't know why though...
My theory is that because I'm using a styled document and the caret
likely won't care about text pane styles/contents that there's some
offsetting involved... *shrug*
Karsten