title: JTextArea: how to wrap text by words, not characters?
body: <p>I want to avoid an output like this: </p>
  
  <p>Here is some text t<br>
  hat is being wrappe<br>
  d by characters, sp<br>
  litting words in ha<br>
  lf </p>
  
  <p>I am using a JTextArea, with setLineWrap(true). How can I make it wrap words, though? (Is there a way to make it only wrap when there is a space or something?) </p>