public class Applet extends Panel
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.
Modifier and Type | Class and Description |
---|---|
protected class |
Applet.AccessibleApplet
This class implements accessibility support for the
Applet class. |
Panel.AccessibleAWTPanel
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
Applet()
Constructs a new Applet.
|
Modifier and Type | Method and Description |
---|---|
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()
Gets the URL of the document in which this 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 of the applet.
|
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.
|
boolean |
isValidateRoot()
Indicates if this container is a validate root.
|
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.
|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize,