A slider allows the user to enter a point moving data back and forth, which is intuitive in some situations (volume control, for example). a progress bar displays data in a relative form of "full" to "empty" so the user gets a perspective.

The key to hooking the two components together is to share your model in the line:ProgressBar.setModel(Slider.getModel());The JProgressBar is fairly straightforward, but the JSlider has a lot of options, such as orientation and major and minor brands. Here is the example of Sliders and Progress bars