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 Java 8 in Action this week in the Java 8 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: window closing?
 
Similar Threads
passing the selected value back to calling page
Swing wait for response
Popup window close button
how many remaining?
WA #1.....word association