Stormy's Java Playground

Here are some simple java applets I've written. These are my first attempts at java, so I'm not sure I did things the best way possible.

Feel free to contact me: brian@stormyprods.com


Slide Anagram
[Source] [Class file]
This applet takes 3 strings as arguments and will slide the letters around from one string to the next. It assumes the strings are of equal length and that they are anagrams (i.e. they all contain the same letters). Wierd things will happen is you don't provide proper strings.
The speed of the sliding is a bit unpredictable. It looks just fine on a (gasp) Mac, and also on netscape under unix, and even using Microsoft's IE on any platform, however under netscape on win95 it seems a bit slow.
Future enhancements: Have the applet read the strings from a URL reference, allowing any number of strings to cycle through. Have it take the usual text info parameters, such as font color, point size, etc.

Time Served
[Source] [Class file]
This applet will display how much time has passed since a certain date. The default date is May 16, 1988, 8:30 AM (my date of hire where I currently work). Unlike most applets of this type, this program displays the time in a more human understandable format - Years, months, days, hours, minutes, seconds, rather than just days, hours, minutes, seconds.
This applet could easily be re-written as a javascript program, and it probably would make more sense to do it that way in order to have the text match the style of the rest of the page.

Yikes!


Anagram Text
[Source] [Class file]
This is an earlier version of Slide Anagram (above). Instead of the letters sliding around, they just jump to the next position. This was just an intermediate step until my final Slide Anagram program, but someone might find it useful, I guess.
As can be seen from the source code, I based this program on the NervousText demo which comes with Sun's java SDK.

For an excellent selection of sample java applets, check out www.gamelan.com. Gamelan