All Packages  Class Hierarchy  This Package  Previous  Next  Index



public class BalloonRace
extends Frame
implements WindowListener, KeyListener
Run a simple balloon race.

Variable Index

The height of our race track.

Constructor Index

o BalloonRace()
Create a new race with no participants and a default wind.
o BalloonRace(Wind)
Create a new race with no participants and a specified wind.

Method Index

o add(Balloon)
Add a balloon.
o add(String, Balloon, Strategist)
Add a racer: a name, a balloon, and a strategist.
o handleKey(char)
Deal with the user pressing a key on the keyboard.
o keyPressed(KeyEvent)
Handle the user pressing a key.
o keyReleased(KeyEvent)
Handle the user releasing a key.
o keyTyped(KeyEvent)
Handle the user typing a key.
o main(String[])
Start and run the GUI.
o paint(Graphics)
Paint stuff on the screen.
o pause(long)
Pause for a little while.
o reportResults()
Report the results at the end of the race.
o start()
Start the race