protected synchronized void updateImage(int x, int y, int width, int height) {
protected void updateImage(int x, int y, int width, int height) {
	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)) {			paintComponent2(g2d);		}		//      if (tileimage != null) {		//		//         AlphaComposite ac =		// AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.5f);		//         g2d.setComposite(ac);		//         g2d.drawImage(tileimage, null, null);		//      }		// LDC - WVL : 08/09/2003 : TR.000358		// TN5250j overpaints superimposed components		// as swing doesn't support overlay detection when painting a component		// we have to adhere to swing's paint request and use dirty rectangle		// marking		// instead of off-thread painting		// So we replaced the complete block underneath by 1 repaint request		// 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);		//            }		//      }		if (x == 0)			width += bi.offLeft;		else			x += bi.offLeft;		if (y == 0)			height += bi.offTop;		else			y += bi.offTop;		gui.repaint(x, y, width, height);	}