JTextComponent textComp1 = new JTextArea(); JTextComponent textComp2 = new JTextArea(); textComp2.setDocument(textComp1.getDocument());
JTextComponent textComp1 = new JTextArea(); JTextComponent textComp2 = new JTextArea(); textComp2.setDocument(textComp1.getDocument());