I have a class that is sometimes called from the command line and sometimes
from another class.
When the user clicks "Quit" on the panel it opens, if it is running from the
command line, it quits. The problem is that I need a way to terminate the
class and the object without using quit, so it doesn't kill other classes.
The QUIT button calls an actionListener, so if I have "return" in the
listener, it closes the window, but the class is still active.
How can I return from the class (does that makes sense) and get the object
made from this class to "self destruct" without exiting the JVM?
Thanks!
Hal
from another class.
When the user clicks "Quit" on the panel it opens, if it is running from the
command line, it quits. The problem is that I need a way to terminate the
class and the object without using quit, so it doesn't kill other classes.
The QUIT button calls an actionListener, so if I have "return" in the
listener, it closes the window, but the class is still active.
How can I return from the class (does that makes sense) and get the object
made from this class to "self destruct" without exiting the JVM?
Thanks!
Hal
Comment