public synchronized void addTask(Runnable task){
  if (worker == null) {
    worker=new LayoutThread();
    worker.start();
  }
  tasks.addElement(task);
  notifyAll();
}

public synchronized void addTask ( Runnable task ) { if ( worker == null ) { worker = new LayoutThread ( ) ; worker . start ( ) ; } tasks . addElement ( task ) ; notifyAll ( ) ; }
add a task that is not needed immediately because the results are not believed to be visible .
