ch.claudio.me
Class P1NG

java.lang.Object
  extended by MIDlet
      extended by ch.claudio.me.P1NG

public class P1NG
extends MIDlet


Constructor Summary
P1NG()
           
 
Method Summary
protected  void destroyApp(boolean arg0)
           
 java.lang.String getAppletInfo()
          Return class name and copyright.
 void paint(java.awt.Graphics gApplet)
          Draw the ball and the racket.
protected  void pauseApp()
           
 void run()
          run methods executes all "background" actions which do not have a user trigger.
protected  void startApp()
           
 void update(java.awt.Graphics graphics)
          BK: We use repaint() to schedule painting.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

P1NG

public P1NG()
Method Detail

getAppletInfo

public java.lang.String getAppletInfo()
Return class name and copyright.

Returns:
Applet copyright

paint

public void paint(java.awt.Graphics gApplet)
Draw the ball and the racket.

Parameters:
gApplet - unused

update

public void update(java.awt.Graphics graphics)
BK: We use repaint() to schedule painting. This goes through update(). In AWT Components update() erases the screen first, then calls paint(). In Swing update() only calls paint(). Because we overwrite everything anyway we don't need the erase of the AWT version, just the call to paint(). If it were Swing we could leave the update() method as is.

Parameters:
graphics - see above

run

public void run()
run methods executes all "background" actions which do not have a user trigger.


startApp

protected void startApp()
                 throws MIDletStateChangeException
Throws:
MIDletStateChangeException

pauseApp

protected void pauseApp()

destroyApp

protected void destroyApp(boolean arg0)
                   throws MIDletStateChangeException
Throws:
MIDletStateChangeException