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

public class stil2D extends JApplet {
   
    public void init() 
    {
        setBackground(Color.white);
        setForeground(Color.black);
    }

   
    public void paint(Graphics g) 
    {
        Graphics2D g2 = (Graphics2D) g;       
        String stilListesi[]; 
        //stilListesi=getToolkit().getFontList();
        Font fonts[]=GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts();  
        int y=15; 
        for(int i=0;i<fonts.length;i++) 
        { 
        g2.drawString(i+" "+fonts[i].getFontName(),15,y); 
        y+=15; 
        } 
    }

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

}
