Rectangle box = new Rectangle(); getBox(box);
boxRect = getBox(boxRect);
  protected void paintIndeterminate(Graphics g, JComponent c)  {    //need to paint the box at it's current position. no text is painted since    //all we're doing is bouncing back and forth    Color saved = g.getColor();    Insets insets = c.getInsets();    Rectangle or = c.getBounds();    Rectangle vr = new Rectangle();    SwingUtilities.calculateInnerArea(c, vr);    g.setColor(c.getBackground());    g.fill3DRect(vr.x, vr.y, vr.width, vr.height, false);    Rectangle box = new Rectangle();    getBox(box);    g.setColor(c.getForeground());    g.fill3DRect(box.x, box.y, box.width, box.height, true);    if (progressBar.isStringPainted() && !progressBar.getString().equals(""))      paintString(g, 0, 0, or.width, or.height,                  getAmountFull(insets, or.width, or.height), insets);    g.setColor(saved);  }