GraphicsApplet 5

This applet combines the previous four applets into one configurable applet:

Here's the applet drawing a line:

<applet code="GraphicsApplet.class" width=200 height=200>

<param name=shape value="Line">

<param name=color value="00ff00">

</applet>


Here's a rectangle instead:

<applet code="GraphicsApplet.class" width=200 height=200>

<param name=shape value="Rectangle">

<param name=color value="aa0f22">

</applet>


Here's an example that draws the string "Applets are forever" in a purple color:

<applet code="GraphicsApplet.class" width=200 height=200>

<param name=shape value="String">

<param name=color value="ff00ff">

<param name=text value="Applets are forever">

</applet>


Here's an example that draws an image of the friendly HotJava mascot, Duke:

<applet code="GraphicsApplet.class" width=200 height=200>

<param name=shape value="Image">

<param name=image value="images/duke.gif">

</applet>

Here's the source: GraphicsApplet.java