Home > Programming, Tutorials > JScrollPane back to top

JScrollPane back to top

If you want to make your JScrollPane return to the top once you have enter some text, try this:

myTextArea.setCaretPosition( 0 )

It places the curser back to zero and in turn makes the JScrollPane go back to the top.
Worked for me, hope this helps someone.

Pete Programming, Tutorials ,

  1. No comments yet.
  1. No trackbacks yet.