Written a few years ago, an applet which nicely draws a mandelbrot fractal (even with adjustable parameters).
You can use the left mouse button to zoom in, and the right to zoom out (click on “read more” to see the applet).

The (very simple and immature) code is attached: Mandel.java. You can use in your webpage with:

In JSF (JavaServer Faces), the use of a SelectList or SelectMenu is combined with the use of a List<SelectItem> in a backing bean. Most of the times you already have a list wih the items to choose from, and have to rewrite that list to selectItems. And then add a way in your backing bean to set the selected item when the form is send. With JBoss Seam it’s completely coverered in the framework:

With only this in your JSF page, combined with a standard entity manager bean (extension of EntityHome class, part of the Seam apllication framework):

public class EHome extends EntityHome {
}

The <s:convertEntity /> automagically converts a standard list into a SelectItem list, and the does all the plumbing of setting the selected object in instance.var, according to the selected item from the SelectItem list.