synchronized (lock) {
   public void drawImageBuffer(Graphics2D gg2d,int x, int y, int width, int height) {      synchronized (lock) {         gg2d.drawImage(bi.getSubimage(x,y,width,height),null,x,y);      }   }