Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how ro calculate time remaining for the jprogressbar to complete 100%?

807580Feb 5 2010 — edited Feb 5 2010
Sir i want to know that how to calculate time remaining directly from jprogressbar like windows xp has.
I am creating a copy file method in that i able to copy all the files and also the jprogressbar monitors the process well.
But i also wan't time remaining to be appear below the jprogressbar.

So i need a logic for calculating time remaining.
i have search in the google the logic was
time remaining = timediff * bytescopied / size;
but it doesn't give me exact time remaining output and also the time goes faster it doesn't wait for one second then another second and so on.
Plz help me with any idea's of your's.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 5 2010
Added on Feb 5 2010
2 comments
2,031 views