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

public class quadcurveP extends JPanel
{
    public void paintComponent(Graphics g) {
	    super.paintComponent(g);
        Graphics2D g2 = (Graphics2D)g;
        g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
        RenderingHints.VALUE_ANTIALIAS_ON);
        Dimension boyut=getSize();
        int dx=boyut.width;
        int dy=boyut.height;
        g2.setPaint(Color.BLACK);
        g2.draw3DRect(0,0,dx-3,dy-3,true);
        g2.draw3DRect(3,3,dx-7,dy-7,false);
        g2.setPaint(Color.BLACK);
        QuadCurve2D qc2=new QuadCurve2D.Double(0,125,140,225,225,150);
        g2.draw(qc2);
        QuadCurve2D qc2_1=new QuadCurve2D.Double(0,200,155,225,225,170);
        g2.setPaint(Color.blue);
        g2.fill(qc2_1);
    }

}

