Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to close a program after choosing exit in a dialog box?

Status
Not open for further replies.

javaken

Technical User
May 15, 2004
20
BE
Stupid question !!!???
 
When you opened some files or database-connections or ... and didn't close them, this is a dirty exit and may cause memory-leaks.

You might create the dialog with a reference to the resource, which has a handle to the open file...

MyExitDialog med = new MyExitDialog (mainFrame);

and call a to-be-written close method from the dialog:

mainFrame.closeCleanly ();


seeking a job as java-programmer in Berlin:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top