Java Reference Index


  1. Introduction
  2. Data Types
  3. Arrays
  4. Operators
  5. Program Control
  6. Classes
  7. Objects
  8. Interfaces
  9. Containers
  10. Class Structure
  11. Error Handling

    Program Types

  12. Applications
  13. Applets

    How To

  14. Type Conversions

    Packages

  15. java.lang.reflect
  16. java.applet
  17. java.awt
  18. java.beans
  19. java.io
  20. java.lang
  21. java.math
  22. java.net
  23. java.rm
  24. java.security
  25. java.sa
  26. java.text
  27. java.util
  28. java.servlet

    Classes

  29. Object Class

    Appendices

  30. Terms
  31. Credits

java.applet Package

Interfaces

  • AppletContext
  • AppletStub
  • AudioClip

AppletContext Class

Methods:

  • getApplet(String) - Returns an applet with the string name
  • getApplets() - Returns an Enumeration object of all applets in the document.
  • getAudioClip(URL) - Returns an audio clip object, applet.AudioClip.
  • getImage(URL) - Returns an image, java.awt.Image.
  • showDocument(URL) - Replaces the current web page with the page at the URL.
  • showDocument(URL, String) - The string specifies a target window for the web page.
  • showStatus(String) - The string passed is shown in the web browser status window.

AppletStub Class

Methods:

  • appletResize(int width, int height) - Change size of Applet.
  • getAppletContext() - Returns java.applet.Applet context handler.
  • getCodeBase() - Returns java.net.URL, the applet's URL.
  • getDocumentBase() - Returns java.net.URL, the document's URL.
  • getParameter(String) - Returns java.lang.String, the parameter in the HTML tag.
  • isActive() - Returns a boolean value of true if the applet is active.

AudioClip Class

Methods:

  • loop() - Returns void, plays an audio clip over and over.
  • play() - Play the audio clip.
  • stop()

Applet Class Methods

Applet extends panel. The set of Applet superclasses:

  • Object
    • Component
      • Container
        • Panel
          • Applet

Methods:

  • applet() - Constructor
  • destroy()
  • getAppletContext() - Returns java.applet.Applet context.
  • getAppletInfo() - Returns java.lang.String which contains information about the applet such as version and author of the applet. This method should be overridden in created applets.
  • getAudioClip (URL) - Returns an audio clip object, applet.AudioClip.
  • getAudioClip (URL, String) - Returns an audio clip object, applet.AudioClip. The string is the audio clip location relative to the URL.
  • getCodeBase() - Returns the applet URL, java.net.URL.
  • getDocumentBase - Returns java.net.URL, the document's URL.
  • getImage(URL) - Returns an image, java.awt.Image.
  • getLocale() - Returns the applet locale java.util.Locale.
  • getParameter(String) - Returns java.lang.String, the HTML tag parameter value based on the String.
  • getParameterInfo() - Returns java.lang.String[][] with information about the Applet's parameters. The name, type, and parameter description are included.
  • init() - Initializes the applet when it is loaded.
  • isActive() - Returns a boolean value of true if the applet is active.
  • play(URL) - Play the audio clip at the URL.
  • play(URL, String)
  • resize(int width, int height) - Change size of Applet.
  • resize(Dimension) - Uses a dimension object to set the size of the applet.
  • setStub(AppletStub) - Done by the system.
  • showStatus(String) - The string passed is shown in the web browser status window.
  • start() - Starts running the applet. See the section on applets.
  • stop() - Stops the applet.