• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JProgressBar - Please Help

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you can get something like a file size in you heavy–process method you can use the determinate mode in the JProgressBar.
reply
    Bookmark Topic Watch Topic
  • New Topic