FileDocCategorySizeDatePackage
ListNew.javaAPI DocExample3960Mon Apr 06 18:10:22 BST 1998None

ListNew

public class ListNew extends Applet

Fields Summary
String[]
flavors
List
lst
TextArea
t
Button
b
int
count
Constructors Summary
Methods Summary
public voidinit()

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

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