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);