any methods available to stop a JProgressBar at runtime?? i wil start a progress bar wen a button is clicked(which wil start a thread at the back ground). what i exactly want is to stop the progress bar wen a deadlock situation occurs in my program.. This is the gist of my program..
+1
A:
Perhaps you can use ProgressMonitor?
From the API documentation:
Deciding Whether to Use a Progress Bar or a Progress Monitor Use a progress monitor if:
- You want an easy way to display progress in a dialog.
- The running task is secondary and the user might not be interested in the progress of the task. Progress monitor provides a way for the user to dismiss the dialog while the task is still running.
- You want an easy way for the task to be cancelled. Progress monitor provides a GUI for the user to cancel the task. All you have to do is call progress monitor's isCanceled method to find out if the user pressed the Cancel button.
Just some thoughts, hope this helps.
javamonkey79
2009-07-10 05:20:32