I'm writing a swing GUI for a program using AWS S3 java SDK; I am using a MultipleFileDownload naed download and when it starts downloading I have to add:
download.waitForCompletion();
this is a blocking call so even if I addeded a listener to update a progress bar status (JProgressBar)
download.addProgressListener(createProgressListener(download));
the progressbar won't change status until the download process has succesfully ended.
Is there any way to add a 2nd worker or thread to update the progress bar while downloading ?