View RectanglesFrame.html.

View RectanglesPanel.html.

Download RectanglesFrame.java.

Download RectanglesPanel.java.

Run Applet version.
This requires an up to date version of Java in your brower.