Need help to get an identical copy of a JTextPane (with all attributes and text). When the font size of the second textpane is changed with the following code it must not affect the first TextPane.
**************************
SimpleAttributeSet attributes = new SimpleAttributeSet();
StyleConstants.setFontSize(attributes, 11);
int length = txtPane2.getDocument().getLength();
txtPane2.getStyledDocument().setParagraphAttributes(0, length, attributes, false);
**************************
**************************
SimpleAttributeSet attributes = new SimpleAttributeSet();
StyleConstants.setFontSize(attributes, 11);
int length = txtPane2.getDocument().getLength();
txtPane2.getStyledDocument().setParagraphAttributes(0, length, attributes, false);
**************************