1  import java.awt.Graphics;
  2  import java.awt.Graphics2D;
  3  import javax.swing.JComponent;
  4  
  5  public class ItalianFlagComponent extends JComponent
  6  {
  7     public void paintComponent(Graphics g)
  8     {
  9        Graphics2D g2 = (Graphics2D) g;
 10        ItalianFlag flag = new ItalianFlag(100, 100, 90);
 11        flag.draw(g2);
 12     }
 13  }