if ((dx != 0 && dy != 0) || damaged)
if ((dx != 0 && dy != 0) || (dy == 0 && dy == 0) || damaged)
  protected boolean computeBlit(int dx, int dy, Point blitFrom, Point blitTo,                                Dimension blitSize, Rectangle blitPaint)  {    if ((dx != 0 && dy != 0) || damaged)      // We cannot blit if the viewport is scrolled in both directions at      // once.      return false;    Rectangle portBounds = SwingUtilities.calculateInnerArea(this, getBounds());    // Compute the blitFrom and blitTo parameters.    blitFrom.x = portBounds.x;    blitFrom.y = portBounds.y;    blitTo.x = portBounds.x;    blitTo.y = portBounds.y;    if (dy > 0)      {        blitFrom.y = portBounds.y + dy;      }    else if (dy < 0)      {        blitTo.y = portBounds.y - dy;      }    else if (dx > 0)      {        blitFrom.x = portBounds.x + dx;      }    else if (dx < 0)      {        blitTo.x = portBounds.x - dx;      }    // Compute size of the blit area.    if (dx != 0)      {        blitSize.width = portBounds.width - Math.abs(dx);        blitSize.height = portBounds.height;      }    else if (dy != 0)      {        blitSize.width = portBounds.width;        blitSize.height = portBounds.height - Math.abs(dy);      }    // Compute the blitPaint parameter.    blitPaint.setBounds(portBounds);    if (dy > 0)      {        blitPaint.y = portBounds.y + portBounds.height - dy;        blitPaint.height = dy;      }    else if (dy < 0)      {        blitPaint.height = -dy;      }    if (dx > 0)      {        blitPaint.x = portBounds.x + portBounds.width - dx;        blitPaint.width = dx;      }    else if (dx < 0)      {        blitPaint.width = -dx;      }    return true;  }