All pastes #497351 Raw Edit

Untitled

public text v1 · immutable
·published 2007-05-19 20:16 UTC
rendered paste body
Is this doable?

final DownloadFile file;
new Thread(new Runnable(){
  public  void run(){
    while (anotherFile()) {
      file = new DownloadFile(URL, LOCAL_DIR, nextFile());
    }
  }
}).start();

new Thread(new Runnable(){
  public  void run(){
    while (!file.completed()) {
      lblProgress.setText("Bytes received for "+file.getFileName()+": "+file.getBytesReceived());
      this.wait(1000);
    }
  }
}).start();