FileDocCategorySizeDatePackage
Counter4.javaAPI DocExample4617Mon Apr 06 18:10:22 BST 1998None

Ticker

public class Ticker extends Thread

Fields Summary
private Button
b
private TextField
t
private int
count
private boolean
runFlag
Constructors Summary
public Ticker(Container c)

     
    b.addActionListener(new ToggleL());
    Panel p = new Panel();
    p.add(t);
    p.add(b);
    c.add(p);
  
Methods Summary
public voidrun()

    while (true) {
      if(runFlag)
        t.setText(Integer.toString(count++));
       try {
        sleep(100);
      } catch (InterruptedException e){}
    }