public synchronized void drawImageBuffer(Graphics2D gg2d) {
public synchronized void drawImageBuffer(Graphics2D gg2d,int x, int y, int width, int height) {
   public synchronized void drawImageBuffer(Graphics2D gg2d) {       /**        * @todo this is a hack and should be fixed at the root of the problem        */      if (gg2d == null) {         System.out.println(" we got a null graphic object ");         return;      }      synchronized (lock) {         gg2d.drawImage(bi,null,0,0);         // tell waiting threads to wake up         lock.notifyAll();      }   }