img
Method
Description
AudioClip getAudioClip(URL url,
Returns an AudioClip object that encapsulates the
String clipName)
audio clip found at the location specified by url and
having the name specified by clipName.
URL getCodeBase( )
Returns the URL associated with the invoking applet.
URL getDocumentBase( )
Returns the URL of the HTML document that invokes
the applet.
Image getImage(URL url)
Returns an Image object that encapsulates the image
found at the location specified by url.
Image getImage(URL url,
Returns an Image object that encapsulates the image
String imageName)
found at the location specified by url and having the
name specified by imageName.
Locale getLocale( )
Returns a Locale object that is used by various locale-
sensitive classes and methods.
String getParameter(String paramName)
Returns the parameter associated with paramName.
null is returned if the specified parameter is not found.
String[ ] [ ] getParameterInfo( )
Returns a String table that describes the parameters
recognized by the applet. Each entr y in the table must
consist of three strings that contain the name of the
parameter, a description of its type and/or range, and
an explanation of its purpose.
void init( )
Called when an applet begins execution. It is the first
method called for any applet.
boolean isActive( )
Returns true if the applet has been star ted. It returns
false if the applet has been stopped.
static final AudioClip
Returns an AudioClip object that encapsulates the
newAudioClip(URL url)
audio clip found at the location specified by url. This
method is similar to getAudioClip( ) except that it is
static and can be executed without the need for an
Applet object.
void play(URL url)
If an audio clip is found at the location specified by
url, the clip is played.
void play(URL url, String clipName)
If an audio clip is found at the location specified by url
with the name specified by clipName, the clip is played.
void resize(Dimension dim)
Resizes the applet according to the dimensions specified
by dim. Dimension is a class stored inside java.awt. It
contains two integer fields: width and height.
void resize(int width, int height)
Resizes the applet according to the dimensions
specified by width and height.
final void setStub(AppletStub stubObj)
Makes stubObj the stub for the applet. This method is
used by the run-time system and is not usually called by
your applet. A stub is a small piece of code that provides
the linkage between your applet and the browser.
TABLE 21-1
The Methods Defined by Applet (continued)
Search WWH :
Custom Search
Previous Page
Java SE 6 Topic Index
Next Page
Java SE 6 Bookmarks
Home