This is a sample Java applet that shows a color spectrum continuously sliding from left to right. It is a simple exmaple demonstrating the use of an off-screencanvas to produce smooth animation. The applet can be any height and width, but I've shown it here as a long bar.
Click here to see the source for this applet.
You can find more of my Java work at http://math.hws.edu/xJava/.