title: JTextPane clear text
body: <p>I'm trying to remove all text from a JTextPane. I thought you could simply use:</p>
  
  <pre><code>textPane.setText(""); 
  </code></pre>
  
  <p>This DOES work, but for some reason, there always is an empty line after calling that method. Why is that and how do I prevent that?</p>