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


public class yildizciz extends JApplet {

    Container c;

    public void init()
    {
        c=getContentPane();
        c.setBackground(renk.beyaz);
        c.setForeground(renk.siyah);
    }

    public void paint(Graphics g)
    {
        Graphics2D g2 = (Graphics2D) g;
        //pencere boyutunu tespit et
        Dimension boyut=getSize();
        //çerceve ciz
        g2.setPaint(renk.siyah);
        Rectangle2D dikdortgen1=new Rectangle2D.Double(2,2,boyut.width-4,boyut.height-4);
        g2.draw(dikdortgen1);
        g2.setPaint(renk.mavi);
        Rectangle2D dikdortgen2=new Rectangle2D.Double(4,4,boyut.width-8,boyut.height-8);
        g2.draw(dikdortgen2);
        //g2.draw3DRect(0,0,boyut.width-1,boyut.height-1,true);
        //g2.draw3DRect(3,3,boyut.width-7,boyut.height-7,false);
        //5 köşeli yıldız ciz
        //yildizSW.drawYildiz(g,100,100, 5,80,0 );
        g2.setPaint(renk.kirmizi);
        yildizSW.fillYildiz(g,100,100, 5,80,0 );
        g2.setPaint(renk.mavi);
        yildizSW.drawYildiz1(g,300,100, 5,80,0 );
    }
    
    public static void main(String s[])
    {
        JFrame f = new JFrame("Grafik ekran düğme kontrol programı");
        f.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e) {System.exit(0);}
        });
        JApplet applet = new yildizciz();
        f.getContentPane().add("Center", applet);
        applet.init();
        f.pack();
        f.setSize(new Dimension(800,400));
        f.setVisible(true);
    }
}
