Java Programs

I found a collection of Turbo Pascal programs that I wrote some time in the 1980s. Since I no longer had Turbo Pascal installed, I decided to rewrite some of those programs in Java. Here are the results.

Note that since these applets are all based on JDK 1.1, you'll need Netscape 4.x or later, Opera with the Sun Java Plugin 1.1.x, or the equivalent Internet Explorer versions. In addition, since each of these applets comes with a main() routine, you can run them with the standalone Java runtime if you have installed the JDK. (If none of that made any sense, just try running the applets. The worst that could happen is they won't do anything and I've been there already. :) )

Maze Generator
An applet that generates a maze. Enter the number of rows and columns of maze cells that you want and click on Go.
Run it. Get the source code.
Taquin
This is the old sliding tiles game. The first two buttons at the top reset the puzzle to normal (numbers in order) and inverted configurations. The inverted configuration is the same as the normal but with the last two numbers switched. There is no sequence of moves that will get the puzzle from the inverted configuration to the normal one. The last button makes about 100 random moves, in effect scrambling the puzzle. To slide the tiles, click on the tile that you want to move into the empty space. The arrow keys work too if keyboard focus is within the applet.
Run it. Get the source code.
Fireworks Display
Simple fireworks display. Up to ten explosions with up to ten rays each at a time on screen. The original program just shot the rays out straight. I thought that was unrealistic so in this rewrite, I added a vertical adjustment to simulate gravity.
Run it. Get the source code.
The "hopalong" strange attractor.
A strange attractor is a chaotic system from which patterns emerge. Hopalong is one of a collection of formulae that when plotted produce unusual and strikingly beautiful images. The Go button starts the plotter. The Random button generates new values for P, Q and R. New values entered in the P, Q and R fields do not take effect immediately. You'll have to click on Go again to restart the plotter.
The Hopalong Fractal was originally by Barry Martin of Aston University and published in Dewney's article in the Sept 1986 Scientific American.
Run it. Get the source code.
Moving Worms
Up to ten worms move around on the screen at the same time. This is a really simple animation. It does not even make the worms avoid running over each other.
Run it. Get the source code.
Perpetual Calendar
Displays the calendar for any year from 1 to 9999. Just enter the year you want in the input box at the top and hit return. Strictly speaking, it isn't historically accurate since it just extends the Gregorian calendar all the way back to year 1 but going forward, it should be adequate.
Run it. Get the source code.
Analog Clock
A simple analog clock applet. This applet can be resized really small so if for some reason, you want a little clock on a web page, go ahead and use it.
Run it. Get the source code.

Back to the top.
Po Shan Cheah
morton@mortonfox.com
ICQ: 2896743
Last updated: October 28, 2006