aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes window closing? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "window closing?" Watch "window closing?" New topic
Author

window closing?

Bigwood Liu
Ranch Hand

Joined: Feb 26, 2003
Posts: 240
Hi friends,
When I close the window by clicking the X at right-top corner, the window closes even I don't add a window listener,why?
Damu
Rick Lu
Ranch Hand

Joined: Mar 25, 2003
Posts: 47

When I close the window by clicking the X at right-top corner, the window closes even I don't add a window listener,why?

You need to check the method "public void setDefaultCloseOperation(int operation)" in JDialog. That will help.
Rick


SCJD 1.4
John Smith
Ranch Hand

Joined: Oct 08, 2001
Posts: 2937
To expand on what Rick said, here is more documentation on the window closing events.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: window closing?