synchronized void discardQueue(){
  queue.removeAllElements();
  for (Enumeration e=running.elements(); e.hasMoreElements(); ) {
    ResourceThread t=(ResourceThread)e.nextElement();
    t.cancel();
  }
  running.removeAllElements();
  bgImageCompsSelected.removeAllElements();
  bgImageCompsUnselected.removeAllElements();
  bgImageCompsPressed.removeAllElements();
  threadCount=0;
  cssCount=-1;
  started=false;
}

synchronized void discardQueue ( ) { queue . removeAllElements ( ) ; for ( Enumeration e = running . elements ( ) ; e . hasMoreElements ( ) ; ) { ResourceThread t = ( ResourceThread ) e . nextElement ( ) ; t . cancel ( ) ; } running . removeAllElements ( ) ; bgImageCompsSelected . removeAllElements ( ) ; bgImageCompsUnselected . removeAllElements ( ) ; bgImageCompsPressed . removeAllElements ( ) ; threadCount = 0 ; cssCount = - 1 ; started = false ; }
discards the entire queue and signals the running threads to cancel . this will be triggered if the user cancelled the page or moved to another page .
