class Browser has method getBrowserWindo w() which returns JEditorPane(new URL("some URL")).

class MainForm calls new Browser().getBr owserWindow() and assigns it to another JEditorPane object.
Code:
editor = new Browser().getBrowserWindow(); 
scrollpane = new JScrollPane(editor);
Object editor.hashCode () is correct, so there's no doubt that i've got the right object.

Still, i can't...