Pregunta

How can I use jEditorPane as jTextArea with the append method in the jTextarea ?

example :

jTextArea.append(mystring);

jEditorPane.?

¿Fue útil?

Solución

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);
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top