FileDocCategorySizeDatePackage
ChoiceNew.javaAPI DocExample3815Mon Apr 06 18:10:22 BST 1998None

ChoiceNew

public class ChoiceNew extends Applet

Fields Summary
String[]
description
TextField
t
Choice
c
Button
b
int
count
Constructors Summary
Methods Summary
public voidinit()

     
    t.setEditable(false);
    for(int i = 0; i < 4; i++)
      c.addItem(description[count++]);
    add(t);
    add(c);
    add(b);
    c.addItemListener(new CL());
    b.addActionListener(new BL());
  
public static voidmain(java.lang.String[] args)

    ChoiceNew applet = new ChoiceNew();
    Frame aFrame = new Frame("ChoiceNew");
    aFrame.addWindowListener(
      new WindowAdapter() {
        public void windowClosing(WindowEvent e) {
          System.exit(0);
        }
      });
    aFrame.add(applet, BorderLayout.CENTER);
    aFrame.setSize(750,100);
    applet.init();
    applet.start();
    aFrame.setVisible(true);