Wednesday, 30 November 2011

AppletContext


AppletContext is the interface defined by java.applet. One application of java is to use active images and animation to provide a graphical means for different java based application.
It is used to get information from the applet’s execution environment.

The context of the currently executing applet is obtained by a call to the getAppletContext( ) method defined by Applet.

Methods

Applet getApplet(String appletName)

This method returns the applet specified by appletName if it is within the current applet context. Otherwise, null is returned.

Enumeration getApplets( )

This method returns an enumeration that contains all of the applets within the current applet context.

AudioClip getAudioClip(URL url)

This method returns an AudioClip object that encapsulates the audio clip found at the location specified by url.

Image getImage(URL url)

This method returns  an Image object that encapsulates the image found at the location specified by url.

void showDocument(URL url)

This method  brings the document at the URL specified by url into view. This method may not be supported by applet viewers.

void showDocument(URL url, String where)

This method brings the document at the URL specified by url into view. This method may not be supported by applet viewers. The placement of the document is specified by where as described in the text.

void showStatus(String str)

This method displays str in the status window

Posted by: Ruchita Pandya

No comments:

Post a Comment