title: Java Swing: Approach for dynamically appending text in text area, have scrollbar update
body: <p>What is the general approach with Java swing to update a textarea with lines of text (say from a Thread) and then have the text caret flow to the bottom of the textarea as text is being added.  Also update the scrollbar so that it is at the bottom.</p>
  
  <p>I was thinking that I would have a stringbuffer and append text to that and then set the string in the textarea and position the scrollbar at the bottom.</p>