java.applet
Class Appletjava.lang.Object | +--java.awt.Component | +--java.awt.Container | +--java.awt.Panel | +--java.applet.Applet
- All Implemented Interfaces:
- Accessible, ImageObserver, MenuContainer, Serializable
- Direct Known Subclasses:
- JApplet
- public class Applet
- extends Panel
An applet is a small program that is intended not to be run on its own, but rather to be embedded inside another application.
The Applet class must be the superclass of any applet that is to be embedded in a Web page or viewed by the Java Applet Viewer. The Applet class provides a standard interface between applets and their environment.
- Since:
- JDK1.0
- See Also:
- Serialized Form
Nested Class Summary
protected class Applet.AccessibleApplet
This class implements accessibility support for the Applet class.
Nested classes inherited from class java.awt.Panel
Nested classes inherited from class java.awt.Container
Nested classes inherited from class java.awt.Component Component.BltBufferStrategy, Component.FlipBufferStrategy
Field Summary
Fields inherited from class java.awt.Component BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
Applet()
Creates a new Applet object
Method Summary
void destroy()
Called by the browser or applet viewer to inform this applet that it is being reclaimed and that it should destroy any resources that it has allocated.AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this Applet.AppletContext getAppletContext()
Determines this applet's context, which allows the applet to query and affect the environment in which it runs.String getAppletInfo()
Returns information about this applet.AudioClip getAudioClip(URL url)
Returns the AudioClip object specified by the URL argument.AudioClip getAudioClip(URL url, String name)
Returns the AudioClip object specified by the URL and name arguments.URL getCodeBase()
Gets the base URL.URL getDocumentBase()
Returns an absolute URL naming the directory of the document in which the applet is embedded.Image getImage(URL url)
Returns an Image object that can then be painted on the screen.Image getImage(URL url, String name)
Returns an Image object that can then be painted on the screen.Locale getLocale()
Gets the Locale for the applet, if it has been set.String getParameter(String name)
Returns the value of the named parameter in the HTML tag.String[][] getParameterInfo()
Returns information about the parameters that are understood by this applet.void init()
Called by the browser or applet viewer to inform this applet that it has been loaded into the system.boolean isActive()
Determines if this applet is active.static AudioClip newAudioClip(URL url)
Get an audio clip from the given URL.void play(URL url)
Plays the audio clip at the specified absolute URL.void play(URL url, String name)
Plays the audio clip given the URL and a specifier that is relative to it.void resize(Dimension d)
Requests that this applet be resized.void resize(int width, int height)
Requests that this applet be resized.void setStub(AppletStub stub)
Sets this applet's stub.void showStatus(String msg)
Requests that the argument string be displayed in the "status window".void start()
Called by the browser or applet viewer to inform this applet that it should start its execution.void stop()
Called by the browser or applet viewer to inform this applet that it should stop its execution.
Methods inherited from class java.awt.Panel addNotify