I just had a look at Processing, which is an environment, based on Java, that lets you create graphics output easily. I’m not remotely doing the thing justice here, better look at the project page for that, and be sure to view the samples!
The idea is great: an editor can be used to create a source code file, which is usually very simple and can be run on the fly, for example rendering some kind of graphics output in a window. When you think you have finished what you were working on, just hit Export and the system will create a Java applet for you, ready for redistribution with a jar file and an HTML page, that does exactly what you programmed in the integrated environment. Nice!