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.
-
BattleShip()
- BattleShip contructor
-
actionPerformed(ActionEvent)
- Responds to user actions
-
destroy()
- Perform shutdown activities
-
getAppletInfo()
- Returns information on applet
-
init()
- Applet initialization
-
paint(Graphics)
- Paints widgets
-
start()
- Start or resume execution
-
stop()
- Suspends execution
BattleShip
public BattleShip()
- BattleShip contructor
init
public void init()
- Applet initialization
- Overrides:
- init in class Applet
start
public void start()
- Start or resume execution
- Overrides:
- start in class Applet
actionPerformed
public void actionPerformed(ActionEvent e)
- Responds to user actions
stop
public void stop()
- Suspends execution
- Overrides:
- stop in class Applet
destroy
public void destroy()
- Perform shutdown activities
- Overrides:
- destroy in class Applet
getAppletInfo
public String getAppletInfo()
- Returns information on applet
- Overrides:
- getAppletInfo in class Applet
paint
public void paint(Graphics g)
- Paints widgets
- Overrides:
- paint in class Container