jTextarea のappendメソッドでjEditorPane を jTextArea として使用するにはどうすればよいですか?
例 :
jTextArea.append(mystring);
jEditorPane.?
jTextarea のappendメソッドでjEditorPane を jTextArea として使用するにはどうすればよいですか?
例 :
jTextArea.append(mystring);
jEditorPane.?
Document
具体的には、Document#insertString
メソッドを見てみましょう。
これで、次のようなことができます...
Document doc = editorPane.getDocument();
doc.insertString(doc.getLength(), "This is the string to insert", null);