swing

StyledDocument

Syntax#

  • doc.insertString(index, text, attributes); //attributes should be a AttributeSet

Creating a DefaultStyledDocument

Adding StyledDocument to JTextPane

Copying DefaultStyledDocument

Serializing a DefaultStyledDocument to RTF


This modified text is an extract of the original Stack Overflow Documentation created by the contributors and released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow