Getting one JtextPane to have same value as another
Posted on 2004-08-04
I have two textPanes, one is editable, the other is not. When a user types in one pane, I want it to appear in the other textpane aswell. I have tried pane2.setText(pane1.getText()) but this is one character too slow. I have also written a custom class for pane2 that makes the processKeyEvent public, I was hoping to just pass the pane1 event onto it. This has no effect however, presumably because there is some kind of filtering going on.
Can someone give me some clues as to how to overcome this problem.