Java provides a special method for drawing filled in rectangular areas. This
method is called fillRect and it takes the same parameters as the drawRect
metod:
g.fillRect(10, 30, 100, 10);This example will draw a very wide and very short rectangle with its upper-left corner at (10,30).
EXAMPLE: This applet is an approximation of what the student will be expected to create. No code will be offered since the student will need to experiment with the use of the fillRect method to successfully complete this activity. |
x |
ASSIGNMENT:
There are two ways of approaching this assignment:
The student is free to select either strategy for recreating the design.