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

A Gentle Introduction to
Java Programming

Tutorial: Introducing Graphics

 

1. Libya


Big

The flag of Libya is a simple green rectangle.

Try the program as it is given, then change it so that the green rectangle is wider.

Flag of Libya

2. France


Big

The flag of France is blue, white and red.

The code given draws only one of the three rectangles required, and it is in the wrong place.

3. Germany


Big

The flag of Germany is black, red and yellow.

Only one of the three rectangles has been drawn - and that one is in the wrong place.

4. Palau


Big

  • The flag of Palau is a yellow circle on a blue background.
  • The rectangle is 300 by 200.
  • The circle is in position 50,50, width and height are 100,100.
  • The RGB values for the blue: 154,176,217.
  • The dark lines are NOT part of the flag. They are shown as guides only.
Flag of Palau

In order to draw a circle we need to track down a method of Graphics or Graphics2D. There is no fillCircle method - but you should find something else that will do the job.

Where to look
Which method exactly?