|
-
February 29th, 2000, 06:48 PM
#1
How to prevent a window from closing?
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
-
March 1st, 2000, 04:46 AM
#2
Re: How to prevent a window from closing?
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
-
March 1st, 2000, 11:35 AM
#3
Re: How to prevent a window from closing?
Sorry, I tried that already. It didn't work.
Any other suggestions ?
Kannan
-
March 1st, 2000, 12:15 PM
#4
Re: How to prevent a window from closing?
If your frame is JFrame , set "setDefaultCloseOperation(int operation)" to "DO_NOTHING_ON_CLOSE"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|