public boolean imageUpdate(Image img, int infoflags, int x, int y, int w,
                             int h) {
    if ((infoflags & (ALLBITS | ABORT)) == 0) {
      return true;
    } else {
      if ((infoflags & ALLBITS) != 0) {
        if (clip != null) {
          synchronized(clip) {
            Graphics2D graphics = (Graphics2D)image.getGraphics();
            graphics.drawImage(img, clip.x, clip.y, clip.width, clip.height,
                               null);
            graphics.dispose();
            clip.notify();
          }
        }
      }
      return false;
    }
  }