FileDocCategorySizeDatePackage
list3.javaAPI DocExample1124Mon Mar 24 02:05:06 GMT 1997None

list3

public class list3 extends Applet

Fields Summary
List
l
Constructors Summary
Methods Summary
public booleanaction(java.awt.Event e, java.lang.Object o)

        if (e.target instanceof Button) {
            String chosen[] = l.getSelectedItems();
            for (int i=0;i<chosen.length;i++)
                System.out.println (chosen[i]);
        }
        return false;
    
public voidinit()

	String []fonts;
	fonts = Toolkit.getDefaultToolkit().getFontList();
        l = new List(4, true);
        for (int i = 0; i < fonts.length; i++)
            l.addItem (fonts[i]);
        setLayout (new BorderLayout (10, 10));
        add ("North", new Label ("Pick Font Set"));
        add ("Center", l);
        add ("South", new Button ("Submit"));
        resize (preferredSize());
        validate();