wood burning stoves 2.0*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes windowlistener Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "windowlistener" Watch "windowlistener" New topic
Author

windowlistener

Sunita Vontel
Ranch Hand

Joined: Aug 28, 2000
Posts: 72
Can somebody please explain why when I click on the x button in the top right corner the window is not exiting why??

Sandeep Potnis
Ranch Hand

Joined: Aug 18, 2000
Posts: 39
Sunita,
You need to order the frame to get outta there, you can't just hint at it.
Try adding System.exit(0); to your windowClosing() method.

hth,
Sandeep
srikrish
Ranch Hand

Joined: Sep 12, 2000
Posts: 63
Sunita,
These are the modifications that you need to do to get what you are looking for:
1. Change WindowClosing method name to windowClosing.
2. Check that you are closing all the braces for the inner class correctly.
3. Add System.exit(0) statement after the println statement in your windowClosing method.
That should make the code work. Let me know if you run into any problems.
Srikrish.
Sunita Vontel
Ranch Hand

Joined: Aug 28, 2000
Posts: 72
Thank u so much sandeep and srikrish
It worked.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: windowlistener