> Hi I was going reading the code on the following site:
> <http://www.jguru.com/faq/view.jsp?EID=534271>
[quoted text clipped - 4 lines]
> Is there a way to change the code so that the progress monitor
> dialogue box appears as soon as the file gets read?
<http://java.sun.com/javase/6/docs/api/javax/swing/ProgressMonitorInputStream.html>
<http://java.sun.com/docs/books/tutorial/uiswing/components/progress.html>
"If it calculates that the task will take more than 2000 milliseconds to
complete, the progress dialog appears. To adjust the minimum waiting
period, invoke setMillisToDecidedToPopup. To adjust the minimum progress
time required for a dialog to appear, invoke setMillisToPopup."

Signature
Op3racional - www.op3racional.eu
---------------------
If you're reading this, you're on Usenet
<http://oakroadsystems.com/genl/unice.htm>
Christian Kaufhold - 03 Jul 2009 15:50 GMT
>> Hi I was going reading the code on the following site:
>> <http://www.jguru.com/faq/view.jsp?EID=534271>
[quoted text clipped - 12 lines]
> period, invoke setMillisToDecidedToPopup. To adjust the minimum progress
> time required for a dialog to appear, invoke setMillisToPopup."
But note that the decision will only be made from within
ProgressMonitor.setProgress, so the dialog will only if at least
something has been written. To make it always appear initially, call
setProgress(0) explicitly once initially.
I remember setting up a custom Timer for this to decide even if no progress
is being made.