title: Lock JScrollPane to bottom of JTextArea (java swing)
body: <p>I currently have a setup where I have a <code>JTextArea</code> inside a <code>JScrollPane</code> so that you can scroll though the text in the box.</p>
  
  <p>What I would like to do is set the <code>JScrollPane</code> up so that whenever new text is added to the box (always at the bottom on a new line) it will scroll down to the bottom.</p>
  
  <p>Is there a simple way to achieve this?</p>
  
  <p><strong>Please note:</strong> I don't want it to be permanently locked onto the bottom (users should still be able to scroll through the text), just when text is being updated. I'm after an effect like when you tail a log file in UNIX.</p>