Barra de Progresso

Como posso fazer uma barra de progresso que aumente a medida que o tempo passa

Pensei em fazer usando threads para o tempo

Ouvi falar de uma JProgressBar da Swing mas não a conheço

Algem poderia me dar uma idéia, desembaralhar meus pensamentos

Se possivel um peq codigo de exemplo

Desde já, obrigado

Constructor Summary 
BasicProgressBarUI() 
            
  Method Summary 
static ComponentUI createUI(JComponent x) 
          Returns an instance of the UI delegate for the specified component. 
protected  int getAmountFull(Insets b, int width, int height) 
          This determines the amount of the progress bar that should be filled based on the percent done gathered from the model. 
protected  int getAnimationIndex() 
          Gets the index of the current animation frame. 
protected  Rectangle getBox(Rectangle r) 
          Stores the position and size of the bouncing box that would be painted for the current animation index in r and returns r. 
protected  int getCellLength() 
          Returns the width (if HORIZONTAL) or height (if VERTICAL) of each of the indivdual cells/units to be rendered in the progress bar. 
protected  int getCellSpacing() 
          Returns the spacing between each of the cells/units in the progress bar. 
 Dimension getMaximumSize(JComponent c) 
          Returns the specified component's maximum size appropriate for the look and feel. 
 Dimension getMinimumSize(JComponent c) 
          The Minimum size for this component is 10. 
protected  Dimension getPreferredInnerHorizontal() 
            
protected  Dimension getPreferredInnerVertical() 
            
 Dimension getPreferredSize(JComponent c) 
          Returns the specified component's preferred size appropriate for the look and feel. 
protected  Color getSelectionBackground() 
          The "selectionBackground" is the color of the text when it is painted over an unfilled area of the progress bar. 
protected  Color getSelectionForeground() 
          The "selectionForeground" is the color of the text when it is painted over a filled area of the progress bar. 
protected  Point getStringPlacement(Graphics g, String progressString, int x, int y, int width, int height) 
          Designate the place where the progress string will be painted. 
protected  void incrementAnimationIndex() 
          Sets the index of the current animation frame, to the next valid value, which results in the progress bar being repainted. 
protected  void installDefaults() 
            
protected  void installListeners() 
            
 void installUI(JComponent c) 
          Configures the specified component appropriate for the look and feel. 
 void paint(Graphics g, JComponent c) 
          Delegates painting to one of two methods: paintDeterminate or paintIndeterminate. 
protected  void paintDeterminate(Graphics g, JComponent c) 
          All purpose paint method that should do the right thing for almost all linear, determinate progress bars. 
protected  void paintIndeterminate(Graphics g, JComponent c) 
          All purpose paint method that should do the right thing for all linear bouncing-box progress bars. 
protected  void paintString(Graphics g, int x, int y, int width, int height, int amountFull, Insets b) 
            
protected  void setAnimationIndex(int newValue) 
          Sets the index of the current animation frame to the specified value and requests that the progress bar be repainted. 
protected  void setCellLength(int cellLen) 
            
protected  void setCellSpacing(int cellSpace) 
            
protected  void startAnimationTimer() 
          Starts the animation thread, creating and initializing it if necessary. 
protected  void stopAnimationTimer() 
          Stops the animation thread. 
protected  void uninstallDefaults() 
            
protected  void uninstallListeners() 
          Removes all listeners installed by this object. 
 void uninstallUI(JComponent c) 
          Reverses configuration which was done on the specified component during installUI.