break; case SCALE_AREA_AVERAGING: filter = new AreaAveragingScaleFilter(width, height); break; case SCALE_SMOOTH: throw new Error("SCALE_SMOOTH: not implemented"); default: throw new Error("Unknown flag or not implemented: " + flags);
  public Image getScaledInstance(int width, int height, int flags)  {    ImageFilter filter;    switch (flags)    {      case SCALE_DEFAULT:      case SCALE_FAST:      case SCALE_REPLICATE:	filter = new ReplicateScaleFilter(width, height);	break;      case SCALE_AREA_AVERAGING:	filter = new AreaAveragingScaleFilter(width, height);	break;      case SCALE_SMOOTH:        throw new Error("SCALE_SMOOTH: not implemented");      default:        throw new Error("Unknown flag or not implemented: " + flags);	}    ImageProducer producer = new FilteredImageSource(getSource(), filter);    return Toolkit.getDefaultToolkit().createImage(producer);  }