• Post Reply Bookmark Topic Watch Topic
  • New Topic

about frame  RSS feed

 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Code must be written if the programmer wants a frame to close on selecting the system close menu
what does this sentence mean? could anyone give me a clear idea?
 
Ranch Hand
Posts: 1072
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you click on File | Close the frame will not be closed unless you code for it !?
 
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i.e. you have to either implement java.awt.event.WindowListener and code the body of windowClosing and/or windowClosed or extend java.awt.event.WindowAdapter and override windowClosing and/or windowClosed.
A proper exit should release the frame resources and then exit, as in:

HIH
------------------
Valentin Crettaz
Sun Certified Programmer for Java 2 Platform
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!