public synchronized void addConsumer(ImageConsumer ic){
  if (theConsumers.contains(ic)) {
    return;
  }
  theConsumers.addElement(ic);
  try {
    initConsumer(ic);
    sendPixels(ic,0,0,width,height);
    if (isConsumer(ic)) {
      ic.imageComplete(animating ? ImageConsumer.SINGLEFRAMEDONE : ImageConsumer.STATICIMAGEDONE);
      if (!animating && isConsumer(ic)) {
        ic.imageComplete(ImageConsumer.IMAGEERROR);
        removeConsumer(ic);
      }
    }
  }
 catch (  Exception e) {
    if (isConsumer(ic)) {
      ic.imageComplete(ImageConsumer.IMAGEERROR);
    }
  }
}

public synchronized void addConsumer ( ImageConsumer ic ) { if ( theConsumers . contains ( ic ) ) { return ; } theConsumers . addElement ( ic ) ; try { initConsumer ( ic ) ; sendPixels ( ic , 0 , 0 , width , height ) ; if ( isConsumer ( ic ) ) { ic . imageComplete ( animating ? ImageConsumer . SINGLEFRAMEDONE : ImageConsumer . STATICIMAGEDONE ) ; if ( ! animating && isConsumer ( ic ) ) { ic . imageComplete ( ImageConsumer . IMAGEERROR ) ; removeConsumer ( ic ) ; } } } catch ( Exception e ) { if ( isConsumer ( ic ) ) { ic . imageComplete ( ImageConsumer . IMAGEERROR ) ; } } }
adds an imageconsumer to the list of consumers interested in data for this image .
