public void dispose(){
synchronized (this.lock) {
    if (page != null) {
      page.dispose();
    }
    previewFrame.dispose();
    if (job != null) {
      job.end();
    }
  }
}

public void dispose ( ) { synchronized ( this . lock ) { if ( page != null ) { page . dispose ( ) ; } previewFrame . dispose ( ) ; if ( job != null ) { job . end ( ) ; } } }
dispose added so that a preview can be canceled
