import java.awt.*;
import java.awt.event.*;
import java.awt.geom.*;
import javax.swing.*;

public class arcSWF_2000 extends JFrame {

    final static Color kirmizi=Color.red;
    final static Color beyaz=Color.white;
    final static Color siyah=Color.black;

    public arcSWF_2000()
    {
        super("arc çizimi");
        setBackground(Color.lightGray);
        setForeground(siyah);
    }

    public void paint(Graphics g) {
        Graphics2D g2 = (Graphics2D)g;
        g2.setPaint(Color.blue);
        Arc2D arc1=new Arc2D.Double(55,55,90,30,90,270,Arc2D.PIE);
        g2.fill(arc1);
        g2.setPaint(siyah);
        Arc2D arc2=new Arc2D.Double(50,50,100,40,90,270,Arc2D.PIE);
        g2.draw(arc2);
        g2.setStroke(new BasicStroke(2f,BasicStroke.CAP_ROUND,
        BasicStroke.JOIN_ROUND,3f,new float[] {10f},0f));
        g2.setPaint(Color.black);
        Arc2D arc3=new Arc2D.Double(50,150,100,40,90,270,Arc2D.PIE);
        g2.draw(arc3);
        GradientPaint kirmizidanbeyaza=new GradientPaint(250,50,kirmizi,350,90,beyaz);
        g2.setPaint(kirmizidanbeyaza);
        Arc2D arc4=new Arc2D.Double(250,50,100,40,90,270,Arc2D.PIE);
        g2.fill(arc4);
        GradientPaint kirmizidanmaviye=new GradientPaint(250,150,kirmizi,350,190,Color.blue);
        g2.setPaint(kirmizidanmaviye);
        Arc2D arc5=new Arc2D.Double(250,150,100,40,90,270,Arc2D.PIE);
        g2.fill(arc5);
        g2.setStroke(new BasicStroke(2f,BasicStroke.CAP_ROUND,
        BasicStroke.JOIN_ROUND,1f,new float[] {5f},0f));
        g2.setPaint(Color.black);
        g2.draw(arc5);
    }

    //=====================================================
      public static void main(String[] args)
      {
      arcSWF_2000 pencere= new arcSWF_2000();
      pencere.addWindowListener(new BasicWindowMonitor());
      pencere.setSize(400,300);
      pencere.setVisible(true);
      }
}
