
 |
Chapter 18 java.applet Reference |
 |
Applet
Name
Applet
The Applet class provides the
framework for delivering Java programs within web pages.
public class java.applet.Applet
extends java.awt.Panel {
// Constructors
public Applet();
// Instance Methods
public void destroy();
public AppletContext getAppletContext();
public String getAppletInfo();
public AudioClip getAudioClip (URL url);
public AudioClip getAudioClip (URL url, String filename);
public URL getCodeBase();
public URL getDocumentBase();
public Image getImage (URL url);
public Image getImage (URL url, String filename);
public Locale getLocale();
public String getParameter (String name);
public String[][] getParameterInfo();
public void init();
public boolean isActive();
public void play (URL url);
public void play (URL url, String filename);
public void resize (int width, int height);
public void resize (Dimension dim);
public final void setStub (AppletStub stub);
public void showStatus (String message);
public void start();
public void stop();
}
- Description
-
Constructs an Applet object.
- Description
-
Called when the browser determines that it doesn't need to keep the
applet around anymore.
- Returns
-
The current AppletContext of
the applet.
- Returns
-
A short information string about the applet to be shown to the user.
- Parameters
-
- url
-
URL of an audio file.
- Returns
-
Object that implements the AudioClip
interface for playing audio files.
- Description
-
Fetches an audio file to play with the AudioClip
interface.
- Parameters
-
- url
-
Base URL of an audio file.
- filename
-
Specific file, relative to url, that
contains an audio file.
- Returns
-
Object that implements AudioClip
interface for playing audio file.
- Description
-
Fetches an audio file to play with the AudioClip
interface.
- Returns
-
The complete URL of the .class
file that contains the applet.
- Returns
-
The complete URL of the .html
file that loaded the applet.
- Parameters
-
- url
-
URL of an image file.
- Returns
-
Image to be displayed.
- Description
-
Initiates the image loading process for the file located at the specified
location.
- Parameters
-
- url
-
Base URL of an image file.
- filename
-
Specific file, relative to url, that contains an image file.
- Returns
-
Image to be displayed.
- Description
-
Initiates the image loading process for the file located at the specified
location.
- Returns
-
Applet's locale.
- Overrides
-
Component.getLocale()
- Description
-
Used for internationalization support.
- Parameters
-
- name
-
Name of parameter to get.
- Returns
-
The value associated with the given parameter in the HTML file, or null.
- Description
-
Allows you to get parameters from within the <APPLET>
tag of the .html file that
loaded the applet.
- Returns
-
Overridden to provide a series of three-string arrays that describes the parameters this applet
reads.
- Description
-
Called by the system when the applet is first loaded.
- Returns
-
true if the applet is active,
false otherwise.
- Parameters
-
- url
-
URL of an audio file .
- Description
-
Plays an audio file once.
- Parameters
-
- url
-
Base URL of an audio file .
- filename
-
Specific file, relative to url, that contains an audio file.
- Description
-
Plays an audio file once.
- Parameters
-
- width
-
New width for the Applet.
- height
-
New height for the Applet.
- Description
-
Changes the size of the applet.
- Parameters
-
- dim
-
New dimensions for the applet.
- Description
-
Changes the size of the applet.
- Parameters
-
- stub
-
Platform specific stubfor environment.
- Description
-
Called by the system to setup AppletStub.
- Parameters
-
- message
-
Message to display to user.
- Description
-
Displays a message on the status line of the browser.
- Description
-
Called by the system every time the applet is displayed.
- Description
-
Called by the system when it wants the applet to stop execution; typically,
every time the user leaves the page that includes the applet.
AppletContext, AppletStub,
AudioClip, Container, Dimension, Image,
Locale, Panel,
String, URL
|
|