Java Programming Challenge: Doing Tic-Tac-Toe as an Applet

By Doug Lowe

This programming challenge is to convert the Swing version of the Tic-Tac-Toe application you create for Java Programming Challenge: Adding a GUI to the Tic-Tac-Toe Program into an applet.

You’ll need to make just a few modifications to the code to make it work, but those changes are key to understanding how a Swing application can be run as an applet. The following figure shows how the Tic-Tac-Toe program should appear when run within the applet viewer.

The Tic-Tac-Toe program as an applet.

The Tic-Tac-Toe program as an applet.

If you need help with this one, go to the Downloads tab of the Java All-in-One For Dummies, 4th Edition product page.

Good luck!