|
-
January 21st, 1999, 11:59 AM
#1
How do you stop a window frame from closing
Hi,
I am new to Java (Been doing C++ and VC++ for years though!), just started using VCafe 3.0.
I am trying to find a way to prevent a window from closing.
When I trap a "WindowClosing" message in WindowEvent, how do I stop it from getting further up to the UI chain and prevent the window closing?
Thank.
-
January 23rd, 1999, 11:51 AM
#2
Re: How do you stop a window frame from closing
After creating the frame call the function
frame.setDefaultCloseOperation( JFrame.DO_NOTHING_ON_CLOSE );
-
January 28th, 1999, 11:36 AM
#3
Re: How do you stop a window frame from closing
After having trapped the "WindowClosing" message in WindowEvent just consume it
using consume method of .. I think of Event Class.
-
January 29th, 1999, 11:50 AM
#4
Re: How do you stop a window frame from closing
Actually this won't work. Swing does not check whether the event is consumed
but instead only looks at the 'closeoperation' flag.
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
|