<Swing Dev> ProgressMonitor and ProgressMonitorInputStream
i30817 at gmail.com
Thu Aug 6 08:07:57 PDT 2009
These classes appear to be quite flawed indeed...
First, there is no way to access the Dialog that progress monitor uses.
Second, the ProgressMonitor dialog is not modal, even if you give a
parent. This is obviously a bad thing in a long running task that
needs to finish before the rest of the UI can progress no?
Third, more complex, there doesn't seem to be a way to use
It lazily creates the dialog. As this class would only be used for
long running tasks, it would be used in a swingworker / thread. So the
dialog is created outside of the EDT unless you do ridiculous
contortions with BufferedInputStream before using the
There also appears to be a bug if you don't call
setMillisToDecideToPopup(0) and setMillisToPopup(0). The internal
timer misbehaves and takes quite a while to popup - i don't know why.
More information about the swing-dev