File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes JProgressBar - Please Help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JProgressBar - Please Help" Watch "JProgressBar - Please Help" New topic
Author

JProgressBar - Please Help

Ronnie Coh
Greenhorn

Joined: Mar 08, 2004
Posts: 13
I have seen several examples of a JProgress bar and file transphers, but I need a JProgressBar to show the time it takes to process something.

Does anyone have an example where the a programming is calculating information and the a JProgressBar is being displayed?

Do I need to use a Thread and how would I do it?
Thanks - Ronnie
Aaron Roberts
Ranch Hand

Joined: Sep 10, 2002
Posts: 174
Are you looking for a progress bar that is really showing the time left or maybe how long something has taken already?

It would be pretty easy to start a timer and have it call a method which updates your display. Timers run on the event dispatch thread, so updating your GUI would be safe.

Does this help?

Regards,
Aaron R>
Ronnie Coh
Greenhorn

Joined: Mar 08, 2004
Posts: 13
I have a program that seems to takes a long time to process/calculate information. In stead of having a blank screen I wanted the user to understand that the program is working.
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
If you can get something like a file size in you heavy–process method you can use the determinate mode in the JProgressBar.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JProgressBar - Please Help
 
Similar Threads
Suggestions on making a progress bar/waiting message
How to get length of task for JProgressbar?
to change the square of the jprogressbar
Updating JList Components
JProgressbar problem