if (!fullRepaint)
if (!fullRepaint) {
   protected synchronized void updateImage(int x, int y , int width, int height) {      if (gg2d == null) {         //System.out.println("was null");            gg2d = (Graphics2D)gui.getGraphics();      }      // check for selected area and erase it before updating screen      if (gui.rubberband != null && gui.rubberband.isAreaSelected()) {         gui.rubberband.erase();      }      if (bi == null || gg2d == null) {         if (bi == null)             System.out.println("bi was null in update image");         if (gg2d == null)             System.out.println("gg2d was null in update image");         return;      }      g2d.setClip(x,y,width,height);      if (!cursorActive && x + width <= bi.getWidth(null) &&          y + height <= (bi.getHeight(null) - fmWidth)) {//      if (!cursorActive) {         paintComponent2(g2d);      }//      if (tileimage != null) {////         AlphaComposite ac = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.5f);//         g2d.setComposite(ac);//         g2d.drawImage(tileimage, null, null);//      }      // fix for jdk1.4 - found this while testing under jdk1.4      //   if the height and or the width are equal to zero we skip the      //   the updating of the image.//      if (gui.isVisible() && height > 0 && width > 0) {//         bi.drawImageBuffer(gg2d,x,y,width,height);//      }         if (gui.isVisible()) {            if (height > 0 && width > 0) {         // We now redraw the selected area rectangle.         if (gui.rubberband != null && gui.rubberband.isAreaSelected()) {            gui.rubberband.draw();         }         if (!fullRepaint)            bi.drawImageBuffer(gg2d,x,y,width,height);         else            gui.repaint();//            System.out.println(" something went right finally " + gui.isVisible() +//                           " height " + height + " width " + width);         }//            else {   //            bi.drawImageBuffer(gg2d);//            System.out.println(" something is wrong here " + gui.isVisible() +//                           " height " + height + " width " + width);//            }      }   }