La progress bar está implementado en swing usando la clase JProgressBar

import java.awt.*;
import javax.swing.*;
import java.awt.event.*;

public class Prog extends JFrame {

JProgressBar jprog;

int num = 0;

public Prog() {
super(“Progress”);

setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel jpane = new JPanel();
jpane.setLayout(new FlowLayout());
jprog = new JProgressBar(0, 2000);
jprog.setValue(0);
jprog.setStringPainted(true);
jpane.add(jprog);
setContentPane(jpane);
}

public void iterar() {
while (num < 2000) {
jprog.setValue(num);
try {
Thread.sleep(1000);
} catch (InterruptedException e) { }
num += 95;
}
}

public static void main(String[] arguments) {
Prog frame = new Prog();
frame.pack();
frame.setVisible(true);
frame.iterar();
}
}