FileDocCategorySizeDatePackage
Counter2.javaAPI DocExample4068Mon Apr 06 18:10:22 BST 1998None

SeparateSubTask

public class SeparateSubTask extends Thread

Fields Summary
private int
count
private Counter2
c2
private boolean
runFlag
Constructors Summary
public SeparateSubTask(Counter2 c2)

     
    this.c2 = c2;
    start();
  
Methods Summary
public voidinvertFlag()

 runFlag = !runFlag;
public voidrun()

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