The first step is to create a working directory somewhere on your filesystem, hereafter referred to as workingdir.
Next, create the directory stickfigure (all lowercase characters) directly under workingdir.
Next, (1) save all the skeleton files, except the *.java files, within workingdir and (2) save the *.java skeleton files within stickfigure, that is, within workingdir/stickfigure.
The next task is to add the bound property "sunburned" to the StickFigure Bean. You must add the isSunburned() and setSunburned() access methods, as well as a boolean variable, say, hasSunburn, which is manipulated by these two methods.
The "sunburned" logic is that if a StickFigure Bean instance is sunburned, the drawing operations should use Color.red as the foreground color. That is, the principal tasks of the setSunburned() method are:
- Set hasSunburn to true or false as specified by the argument
- Set the Bean instance's "foreground" property programmatically, for example:
setForeground(Color.red);
In addition, depending on your design, you will probably need to capture and record/retain the old, pre-sunburn value for the "foreground" property, so that upon a setSunburned(false) method call, you can restore the old value.
Compile all JavaTM source files, *.java, from workingdir by including the stickfigure directory in the path specification.
Build StickFigure.jar from workingdir by executing the file MakeStickFigureJar.bat (Windows) or MakeStickFigureJar.sh (UNIX).
Next, load the StickFigure Bean into the BeanBox (or a comparable tool) using "LoadJar..." from the BeanBox "File" menu.
Lastly, select StickFigure from the palette and create an instance on the worksheet. Verify that the "sunburned" property is present and works properly.