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

public class arc1SWF_2000 extends JFrame {

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

    public arc1SWF_2000()
    {
        super("boyutu değişen arc çizimi");
    }

    public void paint(Graphics g) {
        Graphics2D g2 = (Graphics2D)g;
        g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
        RenderingHints.VALUE_ANTIALIAS_ON);
        setBackground(Color.lightGray);
        setForeground(siyah);
        Dimension boyut=getSize();
        int dx=boyut.width;
        int dy=boyut.height;
        g2.setPaint(siyah);
        g2.draw3DRect(0,0,dx-1,dy-1,true);
        g2.draw3DRect(3,3,dx-7,dy-7,false);
        GradientPaint kirmizidanmaviye=new GradientPaint((float)(20+dx/10.0),
        (float)(20+dy/10.0),kirmizi,(float)(20+dx*8.0/10.0),
        (float)(20+dy*8.0/10.0),Color.blue);
        g2.setPaint(kirmizidanmaviye);
        Arc2D arc1=new Arc2D.Double((20+dx/10.0+3),(20+dy/10.+3),
        (dx*8.0/10.0-3),(dy*8.0/10.0-3),90,270,Arc2D.PIE);
        g2.fill(arc1);
        g2.setPaint(Color.black);
        Arc2D arc2=new Arc2D.Double((20+dx/10.0),(20+dy/10.0),(dx*8.0/10.0),
        (dy*8.0/10.0),90,270,Arc2D.PIE);
         g2.draw(arc1);
    }

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