import java.awt.*; public class FontList extends java.applet.Applet { private TextArea ta = new TextArea(); public void init() { setLayout(new BorderLayout()); add("Center", ta); String [] rgstr = ta.getToolkit().getFontList(); for (int i = 0; i < rgstr.length; i++) { ta.appendText(rgstr[i] + "\n"); } ta.setEditable(false); } public static void main(String [] args) { Frame f = new Frame("Available Fonts"); FontList fl = new FontList(); fl.init(); f.add("Center", fl); f.pack(); f.show(); } }