if (backingStoreImage == null || damaged)
if (backingStoreImage == null || sizeChanged)
  void paintBackingStore(Graphics g)  {    // If we have no backing store image yet or the size of the component has    // changed, we need to rebuild the backing store.    if (backingStoreImage == null || damaged)      {        backingStoreImage = createImage(getWidth(), getHeight());        Graphics g2 = backingStoreImage.getGraphics();        paintSimple(g2);        g2.dispose();      }    // Otherwise we can perform the blitting on the backing store image:    // First we move the part that remains visible after scrolling, then    // we only need to paint the bit that becomes newly visible.    else      {        Graphics g2 = backingStoreImage.getGraphics();        Point viewPosition = getViewPosition();        int dx = viewPosition.x - lastPaintPosition.x;        int dy = viewPosition.y - lastPaintPosition.y;        boolean canBlit = computeBlit(dx, dy, cachedBlitFrom, cachedBlitTo,                                      cachedBlitSize, cachedBlitPaint);        if (canBlit)          {            // Copy the part that remains visible during scrolling.            g2.copyArea(cachedBlitFrom.x, cachedBlitFrom.y,                        cachedBlitSize.width, cachedBlitSize.height,                        cachedBlitTo.x - cachedBlitFrom.x,                        cachedBlitTo.y - cachedBlitFrom.y);            // Now paint the part that becomes newly visible.            g2.setClip(cachedBlitPaint.x, cachedBlitPaint.y,                       cachedBlitPaint.width, cachedBlitPaint.height);            paintSimple(g2);          }        // If blitting is not possible for some reason, fall back to repainting        // everything.        else          {            paintSimple(g2);          }        g2.dispose();      }    // Actually draw the backingstore image to the graphics context.    g.drawImage(backingStoreImage, 0, 0, this);    // Update the lastPaintPosition so that we know what is already drawn when    // we paint the next time.    lastPaintPosition.setLocation(getViewPosition());  }