import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; public class WindowClosedEvent extends WindowAdapter { private ImageWindow window; public WindowClosedEvent(ImageWindow window) { this.window = window; } @Override public void windowClosing(WindowEvent event) { (new CloseVerificationWindow(this.window)).setVisible(true); } }