• Post Reply Bookmark Topic Watch Topic
  • New Topic

JProgressbar problem!  RSS feed

 
Fidel Edwards
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Members,


First of all thanks to Javaranch for providing this nice tutorial JProgressBar. This has almost solved my problem. I am not able to understand that how should I calculate and update my JProgessBar in case of reading long file and parse it accordingly.

Each time the progress bar does not update immediately . I do not know how should I do ?


Any help would be really appreciable.


Thanks in advance !
 
Pari Nanoti
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Make sure you are updating the progress bar in event dispatch thread.

OR

Try using ProgressMonitor
 
Rob Spoor
Sheriff
Posts: 21094
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://faq.javaranch.com/java/JProgressBarDoesntUpdate

Although these days, SwingWorker is often preferred over regular threads.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!