title: How to make a JTextArea moving the scrollbar
body: <p>I am working with Java Swing and I have put a JTextArea in a JScrollBar. What I want is the scrollbar to follow the data.
  For a example i want to write in the JTextArea the output of a for(;;) so i can see the latest (newest) values.
   How could I do that? </p>
  
  <p>EDIT: I have edited the question to be more specific.</p>