FileDocCategorySizeDatePackage
Counter5.javaAPI DocExample6598Mon Apr 06 18:10:22 BST 1998None

Ticker2

public class Ticker2 extends Thread

Fields Summary
private Button
b
private Button
incPriority
private Button
decPriority
private TextField
t
private TextField
pr
private int
count
private boolean
runFlag
Constructors Summary
public Ticker2(Container c)

     
    b.addActionListener(new ToggleL());
    incPriority.addActionListener(new UpL());
    decPriority.addActionListener(new DownL());
    Panel p = new Panel();
    p.add(t);
    p.add(pr);
    p.add(b);
    p.add(incPriority);
    p.add(decPriority);
    c.add(p);
  
Methods Summary
public voidrun()

    while (true) {
      if(runFlag) {
        t.setText(Integer.toString(count++));
        pr.setText(
          Integer.toString(getPriority()));
      }
      yield();
    }