Home arrow static arrow Java Programming [Archive] - how to exit (7 line example) ?
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - how to exit (7 line example) ?
This topic has 5 replies on 1 page.

Posts:18
Registered: 8/12/03
how to exit (7 line example) ?  
Jun 16, 2004 7:36 AM



 
Newbie question: What needs to be done to terminate gracefully after clicking ok ?

import javax.swing.*;
public class Pop {
public Pop() {}
public static void main(String[] args) {
JOptionPane.showMessageDialog(new JFrame(), "SOME MESSAGE");
}
}
 

Posts:24,036
Registered: 2/3/03
Re: how to exit (7 line example) ?  
Jun 16, 2004 7:37 AM (reply 1 of 5)



 
Nuttin', honey.
 

Posts:21,719
Registered: 98-02-20
Re: how to exit (7 line example) ?  
Jun 16, 2004 7:39 AM (reply 2 of 5)



 
It depends on your system.

Close all your file handles and clean up your scarce resources (e.g., database connections, etc.)
System.exit(0)

%
 

Posts:18
Registered: 8/12/03
Re: how to exit (7 line example) ?  
Jun 16, 2004 7:46 AM (reply 3 of 5)



 
duffymo: thanks! silly me ...

yawmark: don't "honey me" for Nuttin' ;)
 

Posts:24,036
Registered: 2/3/03
Re: how to exit (7 line example) ?  
Jun 16, 2004 8:05 AM (reply 4 of 5)



 
LOL. I couldn't tell if you were asking figuratively, as in "what types of things should I do in a clean up method", or asking for that specific example. :o)
 

Posts:18
Registered: 8/12/03
Re: how to exit (7 line example) ?  
Jun 16, 2004 8:31 AM (reply 5 of 5)



 
LOL. I couldn't tell if you were asking figuratively,
as in "what types of things should I do in a clean up
method", or asking for that specific example. :o)

Sorry, I should've been clearer. I tried reducing the issue to a
tiny example leaving out other things that mattered, and when
even that did not work, I posted here in exasperation.
Cleaning up other unfinished hanging things probably helped.

 
This topic has 5 replies on 1 page.