• 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 issue

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


i'm sure validateKeyGenParameters() is return true during press button ok,okPressed().
can not see the steppping progress bar

Sincerely,

Willie
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Read JProgressBar Doesn't Update.
 
Author
Posts: 986
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Rob Prime:
Read JProgressBar Doesn't Update.



The original poster should definitely read that page, but there's more than that going on here.

The code calls the progressBar() method, then presumably it generates the key pair. The thing is, the progressBar() method is implemented to (attempt to) slowly notch the progress bar forward between calls to Thread.sleep(). So first the progressBar() method imposses a multisecond delay, and not until that delay is over does the code start to generate the key pair.

This is, in short, crazy. At the very least the loop calling Thead.sleep() should be running on a different thread from the code generating the key pair. (And neither of those threads should be the Event Dispatch thread.) That would still be kind of crazy, but less so.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic