if (clip.x == 0 && clip.y == 0 && clip.width == getWidth() && clip.height == getHeight())
if (clip == null || (clip.x == 0 && clip.y == 0 && clip.width == getWidth() && clip.height == getHeight()))
  public void paint(Graphics g)  {    RepaintManager rm = RepaintManager.currentManager(this);    // We do a little stunt act here to switch on double buffering if it's    // not already on. If we are not already doublebuffered, then we jump    // into the method paintDoubleBuffered, which turns on the double buffer    // and then calls paint(g) again. In the second call we go into the else    // branch of this if statement and actually paint things to the double    // buffer. When this method completes, the call stack unwinds back to    // paintDoubleBuffered, where the buffer contents is finally drawn to the    // screen.    if (!isPaintingDoubleBuffered && isDoubleBuffered()        && rm.isDoubleBufferingEnabled())      {        Rectangle clip = g.getClipBounds();        paintDoubleBuffered(clip);      }    else      {        if (getClientProperty("bufferedDragging") != null            && dragBuffer == null)          {            initializeDragBuffer();          }        else if (getClientProperty("bufferedDragging") == null            && dragBuffer != null)          {            dragBuffer = null;          }        if (g.getClip() == null)          g.setClip(0, 0, getWidth(), getHeight());        if (dragBuffer != null && dragBufferInitialized)          {            g.drawImage(dragBuffer, 0, 0, this);          }        else          {        Graphics g2 = getComponentGraphics(g);        paintComponent(g2);        paintBorder(g2);        paintChildren(g2);        Rectangle clip = g2.getClipBounds();        if (clip.x == 0 && clip.y == 0 && clip.width == getWidth()            && clip.height == getHeight())          RepaintManager.currentManager(this).markCompletelyClean(this);      }  }  }