Is it possible to create an independent window from within object2 run method? Yes. Generally we try to have only one top–level container in an app. For other windows we use dialogs. Be careful not to use modal dialogs, including all JOptionPane dialogs, in the run method or it will block the run
thread. If you elect a JDialog you could keep a reference to it as a member variable, instantiate it in or via the class constructor and set it visible in the run method. In
java: