Improving The Applet Startup Experience
By Adrian Sutton
We’ve been looking at ways to improve the experience for end users when applets first start up. It’s unfortunate that the worst experience with applets is always the first one since that’s when the JVM has to start up and the applet has to download. Once all that happens subsequent usage of applets tends to be lightning fast – particularly with the latest JVMs.
Sadly, that awful Java coffee cup graphic just doesn’t make users happy while they wait for the applet to download. Equally sadly, there’s no good option to get rid of it. You can specify an image of your own to load, but then it replaces the progress bar and it can’t be dynamically resized to fit the applet. Heck you can’t even center it. Worse yet, by the time the graphic downloads and displays the applet is just about ready so the user winds up seeing an empty box for a while then a brief flash of the image and then the applet’s ready.
You can’t overlay a DIV on top of the applet because most browsers will render the applet on top regardless and there’s no way to show the applet’s download progress from a DIV anyway.
The only vaguely plausible option is a light-weight bootstrap applet that displays while the real applet is loading, but that suffers from the same problems as the image in that it takes too long to download and be ready to display – you’d be better off just loading the applet. Plus it breaks LiveConnect functionality because all of a sudden the public methods on your applet are hidden behind the loader applet. You could delegate through but you’d have to do it via reflection or the class loader will demand the main applet be available before if will load your loader class.
Java 1.4 was a little better in that you could have the progress bar showing with your own custom image in the top left hand corner and you could customize the background color of the rest of the applet. Still ugly but at least workable. With Java 1.5 and above the option to display the progress bar is gone, the default animation is distracting and ugly and the Java 6 animation is going to become even worse with the next update.
Sigh…