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

public class cizgiciz2D extends JApplet {
   
    final static Color bg=Color.white;
    final static Color fg=Color.black;
    
    public void init() 
    {
        setBackground(bg);
        setForeground(fg);
    }


    public void paint(Graphics g) 
    {
        Graphics2D g2 = (Graphics2D) g;       
        Dimension boyut=getSize();
        int dx=boyut.width;
        int dy=boyut.height;
        //çerceve ciz
        g2.setColor(Color.lightGray);
        g2.draw3DRect(0,0,dx-1,dy-1,true);
        g2.draw3DRect(3,3,dx-7,dy-7,false);
        //cizgiciz
        g2.setColor(new Color(0,255,255));
        g2.draw(new Line2D.Double(10,10,230,95));
        g2.setColor(fg);
        g2.drawString("cizgi",10,dy-5);
           }

    public static void main(String s[]) {
        JFrame f = new JFrame("cizgiciz2D");
        f.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e) {System.exit(0);}
        });
        JApplet applet = new cizgiciz2D();
        f.getContentPane().add("Center", applet);
        applet.init();
        f.pack();
        f.setSize(new Dimension(550,200));
        f.show();
    }

}
