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

public class curve3SWF_2000 extends JFrame {

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

    public curve3SWF_2000()
    {
        super("üçüncü dereceden eğri ç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-3,dy-3,true);
        g2.draw3DRect(3,3,dx-7,dy-7,false);
        g2.setPaint(siyah);
        CubicCurve2D cc3=new CubicCurve2D.Double(50,175,140,90,10,90,100,175);
        g2.draw(cc3);
        CubicCurve2D cc3_1=new CubicCurve2D.Double(50,275,140,190,10,190,100,275);
        g2.setPaint(Color.blue);
        g2.fill(cc3_1);
    }

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