Reputation: 25
How can I use jEditorPane as jTextArea with the append method in the jTextarea ?
example :
jTextArea.append(mystring);
jEditorPane.?
Upvotes: 1
Views: 304
Reputation: 347314
I would take a look at the Document
, specifically, the Document#insertString
method.
With this you could could do something like...
Document doc = editorPane.getDocument();
doc.insertString(doc.getLength(), "This is the string to insert", null);
Upvotes: 3