File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

window closing?

 
Bigwood Liu
Ranch Hand
Posts: 240
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 47
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
 
John Smith
Ranch Hand
Posts: 2937
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic