Class AppletTemplate

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

public class AppletTemplate
extends Applet
implements Runnable

Constructor Index

 o AppletTemplate()

Method Index

 o getAppletInfo()
Return information about this applet
 o getParameterInfo()
Return information about this applet's parameters
 o getPreferredSize()
Calculate the preferred size for this applet.
 o init()
Initialize applet:
 o paint(Graphics)
Paint applet, use color for background, print string, character and integer.
 o run()
Do nothing but run the thread
 o start()
Create a new thread, if none, and start it
 o stop()
Stop thread

Constructors

 o AppletTemplate
 public AppletTemplate()

Methods

 o getAppletInfo
 public String getAppletInfo()
Return information about this applet

Returns:
Applet purpose and copyright notice
Overrides:
getAppletInfo in class Applet
 o getParameterInfo
 public String[][] getParameterInfo()
Return information about this applet's parameters

Returns:
Applet parameter list: names, types, and descriptions
Overrides:
getParameterInfo in class Applet
 o init
 public void init()
Initialize applet:

Overrides:
init in class Applet
 o start
 public void start()
Create a new thread, if none, and start it

Overrides:
start in class Applet
 o stop
 public void stop()
Stop thread

Overrides:
stop in class Applet
 o run
 public void run()
Do nothing but run the thread

 o paint
 public void paint(Graphics g)
Paint applet, use color for background, print string, character and integer.

Parameters:
g - Graphics instance for painting operations
Overrides:
paint in class Container
 o getPreferredSize
 public Dimension getPreferredSize()
Calculate the preferred size for this applet. That size ensure that the whole string be enclosed inside the applet bounds, taking in account insets too.

Returns:
Preferred size
Overrides:
getPreferredSize in class Container