if (animationIndex > (numFrames) / 2)
if (animationIndex > numFrames / 2)
  protected Rectangle getBox(Rectangle r)  {    if (!progressBar.isIndeterminate())      return null;    if (r == null)      r = new Rectangle();    Rectangle vr = new Rectangle();    SwingUtilities.calculateInnerArea(progressBar, vr);    // Recalculate the metrics only when size of the progressbar has changed.    if (incr == -1 || boxDependent == -1 || boxIndependent == -1)      {        //numFrames has to be an even number as defined by spec.        int iterations = numFrames / 2;    if (progressBar.getOrientation() == JProgressBar.HORIZONTAL)      {            boxDependent = vr.width / 6.;            incr = ((double) (vr.width - boxDependent)) / (double) iterations;            boxIndependent = vr.height;      }    else      {            boxDependent = vr.height / 6.;            incr = ((double) (vr.height - boxDependent)) / (double) iterations;            boxIndependent = vr.width;          }      }    int index = getAnimationIndex();    if (animationIndex > (numFrames) / 2)      index = numFrames - getAnimationIndex();    if (progressBar.getOrientation() == JProgressBar.HORIZONTAL)      {        r.x = vr.x + (int) (incr * index);	r.y = vr.y;	r.width = (int) boxDependent;	r.height = (int) boxIndependent;      }    else      {	r.x = vr.x;        r.y = vr.height - (int) (incr * index) + vr.y - (int) boxDependent;	r.width = (int) boxIndependent;	r.height = (int) boxDependent;      }    return r;  }