public void updateWindow(boolean repaint){
  boolean done=false;
  Image bb=getBackBuffer(repaint);
  while (!done) {
    if (repaint) {
      Graphics2D g=(Graphics2D)bb.getGraphics();
      try {
        window.paintAll(g);
      }
  finally {
        g.dispose();
      }
    }
    done=update(bb);
    if (!done) {
      repaint=true;
      bb=getBackBuffer(true);
    }
  }
}

public void updateWindow ( boolean repaint ) { boolean done = false ; Image bb = getBackBuffer ( repaint ) ; while ( ! done ) { if ( repaint ) { Graphics2D g = ( Graphics2D ) bb . getGraphics ( ) ; try { window . paintAll ( g ) ; } finally { g . dispose ( ) ; } } done = update ( bb ) ; if ( ! done ) { repaint = true ; bb = getBackBuffer ( true ) ; } } }
updates the window associated with the painter .
