I am using JProgressBar for Showing The Progress Of Data Loaded From from DataBase . I am using SwingWorker Class To Load The Data In BackGround Thread using Tutorial!
@mKorbel has cited many instructive examples, but the key is invoking setProgress() from the worker's doInBackground(). SwingWorker handles the required synchronization. Several helpful answers expand on the topic in this related Q&A, including a reference to this example.