|
|
The Applet ContextThis interface corresponds to an Applet's environment. It can be used by an applet to obtain information from the applet's environment, which is usually the browser or the applet viewer. Usage of Applet ContextWhen you want to use the methods provide by Applet Context, you can use getAppletContext() inside your Applet then use it to reference the method you want. getAppletContext().method_name(...); JAVA API reference : java.applet.AppletContext Examples on Applet Context ClassThe following is an example that show you the usage of showStatus() and showDocument(). When you press the ShowStatus button, you will see "You click on Show Status!" that show below in the browser's status bar. When you press the ShowDocument button, the browser will display the file "Context.java" on screen.
Source code :
|