You use the setMaximum() method to set the JProgressBar's maximum value to the number of files you are converting and every time you convert a file you call setValue() on it with the count of files converted to move the progress bar. Be aware that you need to be converting your files in a seperate
thread from the Swing event thread (i.e. the one that calls your gui listener methods). That same thread is responsable for updating the GUI.