Package: javax.swing.text.* |
Product: Swing |
Release: 1.1.x |
Related Links: |
General
JEditorPane
PlainDocument
|
Comment: |
Document doc = (Document) editorPane.getDocument(); Element e = doc.getDefaultRootElement(); // Copy attribute Set AttributeSet attr = e.getAttributes().copyAttributes(); dbg("-- attr = " + attr ); dbg("-- length = " + doc.getLength() ); doc.insertString(doc.getLength(), "Naam", attr); For exampe: |