Click to See Complete Forum and Search --> : How to prevent a window from closing?


kannanbalu
February 29th, 2000, 05:48 PM
Hi,
How do I prevent a window from closing. I
handled the windowClosing event where I display
a confirmation message to the user. If he/she
clicks no, the window should remain active.
I don't call system.exit(0) when the user
clicks no but the window closes still.

Please reply.

Kannan

kib63613
March 1st, 2000, 03:46 AM
I guess that you might dispose the resource of your Window object.
Frame.dispose() ?
If it is the point, you may consider to remove it from your code.
good luck
Alfred Wu

kannanbalu
March 1st, 2000, 10:35 AM
Sorry, I tried that already. It didn't work.

Any other suggestions ?

Kannan

poochi
March 1st, 2000, 11:15 AM
If your frame is JFrame , set "setDefaultCloseOperation(int operation)" to "DO_NOTHING_ON_CLOSE"