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