javax.swing.text

Insert one DefaultStyledDocument into another DefaultStyledDocument

I want to insert one DefaultStyledDocument into another DefaultStyledDocument. How do I do this? I know of this method: AbstractDocument.insertString(int offs, String str, AttributeSet a) What I really want is something like this: DefaultStyledDocument.insertDocument(int offs, ...

DefaultStyledDocument.styleChanged(Style style) may not run in a timely manner?

I'm experiencing an intermittent problem with a class that extends javax.swing.text.DefaultStyledDocument. This document is being sent to a printer. Most of the time the formatting of the document looks correct, but once in a while it doesn't. It looks like some of the changes in the formatting have not been applied. I took a look at...