Zoo tutorials: [ SQL | Linux | XML ]
ProgZoo: [ Java | C# | VB | C++ | Perl ]
Log in

A Gentle Introduction to
Programming

Tutorial: Rectangles - Austria

 
The method fillRect takes four parameters. The first two are the x and y coordinates of the top left of the rectangle. Note that y is the distance from the top of the picture.
We need to change the x parameter in the last call.

1. Austria


Big

Try the code shown. It draws a big red rectangle then a smaller, white rectangle.

You will notice that the white rectangle is too high. We need to move it down.

Hint:
Flag of Austria