You can create custom tools for the Tool Panel. Custom tools allow users to choose a basic tool (such as line, rectangle, ...), color, and pen by one mouse click.
Say you wish to allow your users to draw roads and rivers on a map.
Let's roads should be drawn with
To implement the tools you have to do the following:
<applet code="ControlPanel.class" ... >
<param name="tools" value="road, river">
<param name="road" value="1,#FF0000,213">
<param name="river" value="0,#0000FF,211">
...
</applet>
Note: Custom tools can be used as an alternative to the basic tools, colors and pens. Don't display the ColorPanel, and PenPanel if you're using custom tools, and don't mix custom and basic tools on the tool panel.