Step 1
Introduction
For the first step, you will just define preliminary versions of the
FractalPanel and FractalApplet classes and write an HTML file for use with
the appletviewer program.
Defining a Preliminary FractalPanel Class
The FractalPanel class extends the JPanel class.
For this step, you only need to give it a constructor that sets the
background color to Color.white.
That is, the following statement should be the only statement in your
constructor.
setBackground(Color.white);
Defining a Preliminary FractalApplet Class
The FractalApplet class should extend the JApplete class.
As is usually the case for a JApplet subclass, all of the code goes into
its init() method.
Your code should do the following.
Testing the Preliminary Class Definitions
Then make up an HTML page for the applet and display it with appletviewer.
The HTML page should be identical to the one for the first programming
assignment except for the title (Fractal Applet), the class specified in
the applet tag (FractalApplet.class), and the width and height in the
applet tag.
For best results, the applet size should be 500 by 420.
When you display the applet with the appletviewer program, you will only
see different colors where the control panel and fractal panel are
installed.
The control panel should be on the left side, with a default gray color.
The fractal panel should be on the right with a white color as determined
by its constructor.
The control panel should be tall and narrow.
The fractal panel should be approximately square.
For comparison, look at the following demonstration applet.
Demonstration Applet