void paintDoubleBuffered(Rectangle r)
void paintDoubleBuffered(Graphics g)
  void paintDoubleBuffered(Rectangle r)  {    RepaintManager rm = RepaintManager.currentManager(this);    // Paint on the offscreen buffer.    Image buffer = rm.getOffscreenBuffer(this, getWidth(), getHeight());    Graphics g = buffer.getGraphics();    Graphics g2 = getComponentGraphics(g);    g2.setClip(r.x, r.y, r.width, r.height);    paint(g2);    g2.dispose();    g.dispose();    // Paint the buffer contents on screen.    Graphics g3 = getGraphics();    g3.setClip(r.x, r.y, r.width, r.height);    g3.drawImage(buffer, 0, 0, this);    g3.dispose();  }