title: What is the replacement for replaceRange(); in JTextArea, for JTextPane?
body: <p>I am currently updating my code for an old applet and I am converting from awt to swing. I want to take advantage of more customization via JTextPane than the old TextArea in awt.</p>
  
  <pre><code>textArea.selectAll();
  textArea.replaceRange("", textArea.getSelectionStart(),
  textArea.getSelectionEnd());
  </code></pre>
  
  <p>How do I make that compliant with a JTextPane? Here is the error I am getting from running the  java *.java command.</p>
  
  <pre><code>chatPne.java:138: cannot find symbol
  symbol  : method replaceRange(java.lang.String,int,int)
  location: class javax.swing.JTextPane
                                  textArea.replaceRange("", textArea.getSelectionStart(),
                                          ^
  </code></pre>