I have a class that extends JFrame, and I am adding a WindowListener in the constructor like this:
where exit() throws up a confirmDialog and returns whether or not the user clicks the Yes button. The problem is, when the user clicks the No button, the window disappears, and the app is stil running in the background. So how do I keep the window up and visible?Code://... this.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent we) { if (exit()) System.exit(0); } }); //...
Thanks
![]()




Reply With Quote