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!
Project
Create the environment—a virtual racetrack using a Graphical User Interface (GUI).
New building blocks
JFrames, Methods
JFrames
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 ...