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.
Image
Figure 9-1   Simple JFrame.
To create a JFrame, first add “extends ...

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

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.