Ejemplo n.º 1
0
  /** paints the Spinner */
  public void paint(Graphics g) {
    int start_angle = 90;
    int done_angle = (int) (percentDone * 360);

    g.setColor(getBackground());
    g.fillArc(3, 3, getSize().width - 8, getSize().height - 8, 0, 360);

    g.setColor(getForeground());
    g.fillArc(3, 3, getSize().width - 8, getSize().height - 8, start_angle, done_angle);

    g.setColor(Color.black);
    g.drawArc(3, 3, getSize().width - 8, getSize().height - 8, 0, 360);
  }