how to close an html window by clicking an applet button ?
Joined: Dec 20, 2000
hi , i need to close my html window when a button in the embedded applet is clicked. is there any method to do this ? thanks
Joined: Jan 07, 1999
Two things. First. Please don't post the same message to more than one forum . Choose an appropriate forum and post the message once. Even if the message might be appropriate to more than one forum it's very likely that people able and willing to answer it will read more than one forum and find your message. Second. The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please choose a new name which meets the requirements. Thanks.
You can't close the browser from an applet, as far as I know. The applet is running in the Browser's JVM and calling System.exit(0) will probably generate an exception. What are you trying to achieve? Maybe there is some other way to get there.
Joined: Jan 29, 2001
i have an applet in an html window. it has among other things , a close button. when user clicks it, the window should be closed.