Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / July 2009

Tip: Looking for answers? Try searching our database.

progress monitor dialogue box timing

Thread view: 
undbund - 30 Jun 2009 10:33 GMT
Hi I was going reading the code on the following site:
http://www.jguru.com/faq/view.jsp?EID=534271

In the comment it mentions that by default, the dialog won't appear
unless the overall estimate is over 2 seconds.

Is there a way to change the code so that the progress monitor
dialogue box appears as soon as the file gets read?

Thanks,
Undbund
Sabine Dinis Blochberger - 30 Jun 2009 12:15 GMT
> 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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.