Set the cursor position in a JTextAreaTag(s): Swing


To the top
myJTextArea.setCaretPosition(0);
To the end
myJTextArea.setCaretPosition(myJTextArea.getDocument().getLength());

blog comments powered by Disqus