public boolean zoom(int zoomFactor) {
      if (img==null) return false;
      if (zoomFactor>1) {
        img=imgUnscaled.getScaledInstance(
        		imgUnscaled.getWidth(null)*zoomFactor, 
        		imgUnscaled.getHeight(null)*zoomFactor, 0);
        MediaTracker tracker = new MediaTracker(this);
        tracker.addImage(img, 0);
        try {
            tracker.waitForID(0);
        } catch (InterruptedException ie) {
            return false;
        }
      } else
        img=imgUnscaled;
      this.zoomFactor=zoomFactor;
      this.setSize(img.getWidth(null), img.getHeight(null));
      this.setPreferredSize(new Dimension(img.getWidth(null), img.getHeight(null)));
      revalidate();
      repaint();
      return true;
  }