|
-
March 6th, 2000, 02:46 PM
#1
applet window close
Hi,
Hi, friends:
I am new to java.
I have quit button in an applet. Can somebody tell me what method can be used to close an applet window if quit button press?
thanks in advance!
-
March 6th, 2000, 03:38 PM
#2
Re: applet window close
If the window is a Frame, call 'dispose()'.
-
March 6th, 2000, 03:54 PM
#3
Re: applet window close
Hi,Jason:
The window is applet window not in the frame.
-
March 6th, 2000, 03:55 PM
#4
Re: applet window close
Hi, Jason:
My project is applet window not in the frame.
-
March 6th, 2000, 07:36 PM
#5
Re: applet window close
If you are running ur applet using applet viewer , then you can close the
applet viewer window. But if you run it inside a browser , you cant do it in pure java.
check out http://www.nevaobject.com/java/index.htm
If you use appletViewer :
Component c = applet;
while( ( c != null ) && !( c instanceof Frame )) c = c.getParent();
if( (c != null )&& (c instanceof Frame ) ){
applet.stop();
applet.destroy(); // I dont know whether these two lines are necessary.
((Frame) c ).hide();
((Frame) c ).dispose();
}
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
|