title: Set the last word of the line to the next line in jtextarea
body: <p>This may be a very simple question but I don't get any answers from anywhere.</p>
  
  <p>I have a string variable that holds a very long paragraph string, and is intended to be placed on a <code>JTextArea</code>, by <code>.setText(str)</code>;</p>
  
  <p>My problem is how to make the last word of the line (that do not fit to the right edge on that line) to be transferred on the next line.</p>
  
  <p>An illustration below may help my problem:</p>
  
  <p>Problem:</p>
  
  <pre><code>The quick brown fox ju
  mps over the lazy dog.
  </code></pre>
  
  <p>Solution needed:</p>
  
  <pre><code>The quick brown fox
  jumps over the lazy
  dog.
  </code></pre>