I am working on a Java Swing application (JDK 7). I have two JEditorPane instances on two different JFrames, that I need to synchronize. I know the hard way of force copying contents on a modified event is one way to do it. But, I was wondering if there is a smarter/easier way to do this. I tried to use the same JEditorPane instances on both the frames, but that did not work.
I believe a reference to the container panel is included in the JEditorPane instance, so the old container is erased when it is added to a new container. Can we create a new subclass of JEditorPane, that can accommodate two containers?
Have you tried something like this before?