I have created a class for uploading a data from excel format to mysql database. The class contains the method to upload into the database. I am using button to call the method. That uploading process taking very long time to upload So, I want to add a progress bar for that process anyone can help me to complete this process,
Asked
Active
Viewed 735 times
0
-
2http://docs.oracle.com/javase/tutorial/uiswing/components/progress.html – giovybus Mar 17 '14 at 10:03
-
2Like [this](http://stackoverflow.com/q/4637215/230513)? – trashgod Mar 17 '14 at 10:05
-
@trashgod not like that. i have called the func which containing the heavy process on button click. no class extension used – scbose Mar 17 '14 at 10:12
1 Answers
1
You need to use a SwingWorker
thread to do the processing and update the progress bar from that.
http://docs.oracle.com/javase/tutorial/uiswing/concurrency/worker.html

Tim B
- 40,716
- 16
- 83
- 128
-
-
3the link in the comment you replied to with "not like that. [...]" contains a working example using `SwingWorker`... – asermax Mar 17 '14 at 10:33