Complex Shapes

How Arcs are Drawn:

Arcs, Rounded Rectangles, Background Colour:

import java.applet.Applet;
import java.awt.*;
public class ComplexShapes extends Applet
{
   public void init ()
   {
   //set the background colour
   setBackground (Color.orange);
   }
 public void paint (Graphics g)
 {
   //draws part of a circle
   g.drawArc (5, 5, 20, 100, 0, 45); //1
   g.drawArc (35, 5, 20, 100, 0, 90); //2
   g.drawArc (65, 5, 20, 100, 0, 120); //3
   g.drawArc (95, 5, 20, 100, 0, 180); //4
   g.drawArc (125, 5, 20, 100, 0, 200); //5
   g.drawArc (155, 5, 20, 100, 0, 270); //6
   g.drawArc (185, 5, 20, 100, 0, 360); //7
   g.drawArc (215, 5, 20, 100, 90, 120); //8
   g.drawArc (245, 5, 20, 100, 90, 200); //9
 //draws rectangle with rounded edges
   g.drawRoundRect (275, 5, 20, 100, 10, 10); //10
 }
}