Class edu.cornell.lassp.mck10.FastApplet.FastApplet
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class edu.cornell.lassp.mck10.FastApplet.FastApplet

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----java.applet.Applet
                                   |
                                   +----edu.cornell.lassp.mck10.FastApplet.FastApplet

public class FastApplet
extends Applet
implements Runnable
FastApplet is a class which can be used in combination with a subclass of AppletPanel to create a fast loading applet. FastApplet displays a splash screen while the main applet's classes are loading. When the classes are all loaded, it displays the AppletPanel, which contains all of the functionality of the main applet. The text and graphics of the splash screen can be customized using < PARAM > tags with the names "InitialMessage" and "PictureURL". The name of the AppletPanel subclass containing the applet is passed in a < PARAM > tag with the name "AppletClass".

Source Code is available.

Version:
1.0
Author:
Matt Kuntz (e-mail: mck10@cornell.edu)

Constructor Index

 o FastApplet()

Method Index

 o init()
init() reads in the param tags, sets up the splash screen and starts a thread for loading the main applet class.
 o paint(Graphics)
paint(g) paints the background image and splash text for the splash screen.
 o run()
run() is called when the thread is started in the init() method.
 o update(Graphics)
update(g) is overridden so that the screen is not blanked before each repaint.

Constructors

 o FastApplet
  public FastApplet()

Methods

 o init
  public void init()
init() reads in the param tags, sets up the splash screen and starts a thread for loading the main applet class.
Overrides:
init in class Applet
 o run
  public void run()
run() is called when the thread is started in the init() method. The applet classes are loaded in the run method. When the classes are done loading, the AppletPanel's setup method is called, and then the splash screen is replaced with the real applet.
 o update
  public void update(Graphics g)
update(g) is overridden so that the screen is not blanked before each repaint.
Parameters:
g - The graphics context of the display to be updated.
Overrides:
update in class Component
 o paint
  public void paint(Graphics g)
paint(g) paints the background image and splash text for the splash screen. After the splash screen is replaced with the real applet, the paint method just calls the default applet paint method.
Parameters:
g - The graphics context of the display to be painted.
Overrides:
paint in class Component

All Packages  Class Hierarchy  This Package  Previous  Next  Index