FileDocCategorySizeDatePackage
checkboxes.javaAPI DocExample1075Mon Mar 24 01:57:02 GMT 1997None

checkboxes

public class checkboxes extends Applet

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


        if (e.target == cb) {
                if ("true".equals(o.toString()))
                        cb.setLabel ("True");
                else
                        cb.setLabel ("False");
        }

        return false;

   
public voidinit()


	String []fonts;

	fonts = Toolkit.getDefaultToolkit().getFontList();

        add (cb = new Checkbox (fonts[0]));
	CheckboxGroup cbg = new CheckboxGroup();
	Panel p = new Panel();
	p.setLayout (new GridLayout (0,1));

	for (int i = 1; i < fonts.length; i++) {

		p.add (new Checkbox (fonts[i], cbg, false));

	}
	add (p);