Hi,
i have a class that extends a JFrame.
>From a main function i create an instance of that class.
Now for the problem..
With Task manager up and watching this java process:
-i click the "X" close icon on the top right of the window. the window
closes, but the javaw.exe process is still showing in task manager.
-now, from a JButton on the form, i simply add the code "System.exit( 0
);". When that button is clicked, the javaw.exe process no longer
shows in task manager.
why is this and how can make sure that this app is cleanly closed when
a user clicks on the "X" window icon?
Sameer Shinde - 26 Mar 2005 09:07 GMT
The default close operation for JFrame is presently JFrame.HIDE_ON_CLOSE.
Change it to EXIT_ON_CLOSE.
see documentation related to setDefaultCloseOperation......
-Sameer
farseer - 27 Mar 2005 08:58 GMT