<Swing Dev> ProgressMonitor and ProgressMonitorInputStream
Paulo Levi
i30817 at gmail.com
Thu Aug 6 15:07:57 UTC 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
ProgressMonitorInputStream sensibly...
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
ProgressMonitorInputStream.
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
mailing list