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

public class chartest extends JApplet {
   
    final static Color bg = Color.white;
    final static Color fg = Color.black;
    final static Color red = Color.red;
    final static Color white = Color.white;
    private String s ="Bunu drawString Metoduyla yazdir"; 
    private char c[]={'c','h','a','r','s',' ','8'};  
   
    public void init() 
    {
        //Initialize drawing colors
        setBackground(bg);
        setForeground(fg);
    }

   
    public void paint(Graphics g) {
        Graphics2D g2 = (Graphics2D) g;
        g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
        Dimension d = getSize();
        int gridWidth = d.width;
        int gridHeight = d.height;
        g2.setPaint(fg);
        char i='\u0001';
        int j=10;
        while(i<'\u00FF')
        {    
        g2.drawString((int)i+" "+i++,j+=50,25);
        }
    }

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

}
