Owl Sams Teach Yourself Java 1.1 Programming in 24 Hours
the Puzzle applet

If your Web browser can handle Java applets, there should be a sliding-tile puzzle above this paragraph. The following HTML tags are used to put the applet on this page:

<APPLET CODE="Puzzle.class" CODEBASE="java" WIDTH=145 HEIGHT=179>
<PARAM NAME="img" value="../images/lilcover.gif">
<PARAM NAME="rows" value=4>
<PARAM NAME="cols" value=4>
<PARAM NAME="scramble" value=25>
</APPLET>

As you can see, this applet takes four parameter. The IMG, ROWS, and COLS parameters determine what is shown and how many tiles it is divided into. The last parameter, SCRAMBLE, determines how many tiles should be moved when the game is initially scrambled.

The Puzzle applet was created by MIT student Christopher Vincent. His site is no longer online, but you may be able to find other tile puzzle applets and source code on the Java Applets Rating Service.

Before hopping over there, though, you should continue to the next applet.