Class java.applet.Applet
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.applet.Applet

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----java.applet.Applet

public class Applet
extends Panel
Base applet class.

Constructor Index

 o Applet()

Method Index

 o destroy()
Cleans up whatever resources are being held.
 o getAppletContext()
Gets a handle to the applet context.
 o getAppletInfo()
Returns a string containing information about the author, version and copyright of the applet.
 o getAudioClip(URL)
Gets an audio clip.
 o getAudioClip(URL, String)
Gets an audio clip.
 o getCodeBase()
Gets the base URL.
 o getDocumentBase()
Gets the document URL.
 o getImage(URL)
Gets an image given a URL.
 o getImage(URL, String)
Gets an image relative to a URL.
 o getParameter(String)
Gets a parameter of the applet.
 o getParameterInfo()
Returns an array of strings describing the parameters that are understood by this applet.
 o init()
Initializes the applet.
 o isActive()
Returns true if the applet is active.
 o play(URL)
Plays an audio clip.
 o play(URL, String)
Plays an audio clip.
 o resize(Dimension)
Requests thatthe applet be resized.
 o resize(int, int)
Requests that the applet be resized.
 o setStub(AppletStub)
Sets the applet stub.
 o showStatus(String)
Shows a status message in the applet's context.
 o start()
Called to start the applet.
 o stop()
Called to stop the applet.

Constructors

 o Applet
  public Applet()

Methods

 o setStub
  public final void setStub(AppletStub stub)
Sets the applet stub. This is done by automatically by the system.
 o isActive
  public boolean isActive()
Returns true if the applet is active. An applet is marked active just before the start method is called.
See Also:
start
 o getDocumentBase
  public URL getDocumentBase()
Gets the document URL. This is the URL of the document in which the applet is embedded.
See Also:
getCodeBase
 o getCodeBase
  public URL getCodeBase()
Gets the base URL. This is the URL of the applet itself.
See Also:
getDocumentBase
 o getParameter
  public String getParameter(String name)
Gets a parameter of the applet.
 o getAppletContext
  public AppletContext getAppletContext()
Gets a handle to the applet context. The applet context lets an applet control the applet's environment which is usually the browser or the applet viewer.
 o resize
  public void resize(int width,
                     int height)
Requests that the applet be resized.
Overrides:
resize in class Component
 o resize
  public void resize(Dimension d)
Requests thatthe applet be resized.
Overrides:
resize in class Component
 o showStatus
  public void showStatus(String msg)
Shows a status message in the applet's context.
 o getImage
  public Image getImage(URL url)
Gets an image given a URL. Note that this method always returns an image object immediatly, even if the image does not exist. The actual image data is loaded when it is first needed.
 o getImage
  public Image getImage(URL url,
                        String name)
Gets an image relative to a URL. This methods returns immediately, even if the image does not exist. The actual image data is loaded when it is first needed.
See Also:
getImage
 o getAudioClip
  public AudioClip getAudioClip(URL url)
Gets an audio clip.
 o getAudioClip
  public AudioClip getAudioClip(URL url,
                                String name)
Gets an audio clip.
See Also:
getAudioClip
 o getAppletInfo
  public String getAppletInfo()
Returns a string containing information about the author, version and copyright of the applet.
 o getParameterInfo
  public String[][] getParameterInfo()
Returns an array of strings describing the parameters that are understood by this applet. The array consists of sets of three strings: name/type/description. For example:
	String pinfo[][] = {
	  {"fps",    "1-10",    "frames per second"},
	  {"repeat", "boolean", "repeat image loop"},
	  {"imgs",   "url",     "directory in which the images live"}
	};
 o play
  public void play(URL url)
Plays an audio clip. Nothing happens if the audio clip could not be found.
 o play
  public void play(URL url,
                   String name)
Plays an audio clip. Nothing happens if the audio clip could not be found.
 o init
  public void init()
Initializes the applet. You never need to call this directly, it is called automatically by the system once the applet is created.
See Also:
start, stop, destroy
 o start
  public void start()
Called to start the applet. You never need to call this method directly, it is called when the applet's document is visited.
See Also:
init, stop, destroy
 o stop
  public void stop()
Called to stop the applet. It is called when the applet's document is no longer on the screen. It is guaranteed to be called before destroy() is called. You never need to call this method directly.
See Also:
init, start, destroy
 o destroy
  public void destroy()
Cleans up whatever resources are being held. If the applet is active it is stopped stopped.
See Also:
init, start, stop

All Packages  Class Hierarchy  This Package  Previous  Next  Index