|
Polygons and window size We can draw all kinds of shapes with drawLine but if we want to "fill in" with color that we have not been able to do that. For example a filled triangle or a trapezoid or any polygon.
| ||||||
|
| ||||||
|
A better way to set the size of a window We can size the window of the applet. You can/should do this in 2 places First Place - Add this to the init method.
setSize(300,
200); When you run it, you will see that this is not a very good size window for Lab5d1. The lesson learned here, is to set the window size before you start adding objects to the applet.
| ||||||
|
Assignments
|