Hello
I am using a swings application. on a particular exception type I am Hiding the Application Main Framae and would need to close the application. Currently I am doing
catch(CustomException ex) {
ExceptionDialog.showExceptionDialog(parent.getMainFrame(), ex);
getMainFrame().dispose();
System.exit(0);
}
Closing the Application by calling System.exit(0) (Java VM termination) method,
I am afraid will close the application Abruptly. I am afraid this is a dangerouus practice as it may lead to other memory leaks or inconsistencies. Is there a better way to close the Application.
Thanks,
Hemanth