Section Two
Racing Games
Project 9: Radical Racing—The Track
Radical Racing
Race cars you build around a track you design with exciting graphics and sound effects!
Create the environment—a virtual racetrack using a Graphical User Interface (GUI).
New building blocks
JFrames, Methods
A JFrame is one of the simplest ways to create a Graphical User Interface. It creates a pop-up box (similar to a JOptionPane) of a specified size. You can add graphics, buttons, text fields, labels, etc.
A JFrame, before any graphics or images are added, is shown in Figure 9-1.
Figure 9-1   Simple JFrame.
To create a JFrame, first add “extends ...

Get Programming Video Games for the Evil Genius now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.