Class BattleShip

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

public class BattleShip
extends Applet
implements ActionListener
BattleShip class defines an applet which consist of game board of 100 buttons and button which starts a new game and a status bar which is used to tell the situation in game.


Constructor Index

 o BattleShip()
BattleShip contructor

Method Index

 o actionPerformed(ActionEvent)
Responds to user actions
 o destroy()
Perform shutdown activities
 o getAppletInfo()
Returns information on applet
 o init()
Applet initialization
 o paint(Graphics)
Paints widgets
 o start()
Start or resume execution
 o stop()
Suspends execution

Constructors

 o BattleShip
  public BattleShip()
BattleShip contructor

Methods

 o init
  public void init()
Applet initialization

Overrides:
init in class Applet
 o start
  public void start()
Start or resume execution

Overrides:
start in class Applet
 o actionPerformed
  public void actionPerformed(ActionEvent e)
Responds to user actions

 o stop
  public void stop()
Suspends execution

Overrides:
stop in class Applet
 o destroy
  public void destroy()
Perform shutdown activities

Overrides:
destroy in class Applet
 o getAppletInfo
  public String getAppletInfo()
Returns information on applet

Overrides:
getAppletInfo in class Applet
 o paint
  public void paint(Graphics g)
Paints widgets

Overrides:
paint in class Container