hide random home http://www.javasoft.com/applets/alpha/applets/autopilot/index.html (PC Press Internet CD, 03/1996)

Surf-o-matic Demo

Patrick Chan, chan@eng.sun.com

Surf-o-matic not only lets you surf the net randomly but also lets you do it automatically. It's almost as good as watching TV! Surf-o-matic delays an amount of time you set and then shows a random page on the net. You just sit back and enjoy the show.

This demo is based on Web Autopilot by Matthew K. Gray. Web Autopilot uses Netscape's new client-pull feature, which HotJava does not implement. Not to leave HotJava users out in the cold, I've whipped a quick-and-dirty applet, Surf-o-matic, that does the same job without client-pull. The following sites have graciously allowed me to use their URL list:

I should warn you that the interfaces used by the control panel window are not stable. They currently don't work very well and will be cleaned up by beta.

Usage:

The Go button starts the show; the Stop button stops it. The Quit button kills the autopilot applet. To restart the applet, you need to hit HotJava's reload button on this page.

You can point Surf-o-matic at different URL lists by using the Site option menu.

You can change the fetching delay at any time by choosing another delay interval. Surf-o-matic can't detect when a page is finished loading so it simply waits the specified delay and then fetches another page, regardless of whether or not the current page is finished.

The "Memory usage" status lets you know how much of the HotJava heap is being consumed. Surf-o-matic automatically stops fetching pages when the heap has less than 10 KBytes of free space.

Bugs:

The Surf-o-matic control panel is not laid out very well; there's too much blank space. The awt layout interfaces are broken and so I had to make it big enough so that none of the contents are hidden on the different platforms.

On NT, you'll occasionally see the HotJava background turn blue. I'm not sure what the problem is but it's on my list of things to look at and fix. As a workaround, go back a few pages until the blue goes away.

Here are the sources: Surfomatic.java, Timeable.java, and Timer.java.