FileDocCategorySizeDatePackage
CardExample.javaAPI DocExample1156Mon Mar 24 02:03:48 GMT 1997None

CardExample

public class CardExample extends Applet

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

        cl.next(this);
        return true;
    
public voidinit()

        
        String fonts[] = Toolkit.getDefaultToolkit().getFontList();
        setLayout (cl);
        Panel p1 = new Panel();
        Panel p3 = new Panel ();
        p1.setLayout (new GridLayout (3, 2));
        List l = new List(4, false);
        Choice c = new Choice ();
        for (int i=0;i<fonts.length;i++) {
            p1.add (new Checkbox (fonts[i]));
            l.addItem (fonts[i]);
            c.addItem (fonts[i]);
        }
        p3.add (l);
        p3.add (c);
        add ("One", p1);
        add ("Two", new Button ("Click Here"));
        add ("Three", p3);