Results 1 to 3 of 3
Thread: problem on progress bar
- 12-25-2009, 08:08 AM #1Member
- Join Date
- Nov 2009
- Rep Power
problem on progress bar
I am doing the swing application in netbeansIDE.In that i select javadesktop application.In my project i take progressbar to show the progress of my application.when the application is start running i start the progresbar as
hear the progress bar is starting with max value 0
and i run some methods like
when executing the methods the progress bar is not incremented.according to running my application i want to increase my progress bar.But not manually incremented.
- 12-25-2009, 07:08 PM #2
Read the API for JProgressBar and follow the link to the tutorial on "How to Monitor Pregress" where you will find working examples. If you still have a problem, post a SSCCE* and ask a specific question.
* SSCCE : Java Glossary
- 12-27-2009, 02:23 AM #3
I can't say that progress won't show if the progress bar is updated by a process running on the EDT, but progress bars were made to be updated by a process running in another thread. Note that the progress updates have to be made using EventQueue.InvokeLater() so they happen on the EDT, but doing so gives the EDT time to redraw the screen. Possibly, you are updating the progress bar, but the fact that the main process is blocking the EDT is preventing the updates from appearing. Also, max value = 0 doesn't sound like a good idea...
- By LeonLanford in forum New To JavaReplies: 2Last Post: 10-21-2009, 04:14 PM
- By IYIaster in forum New To JavaReplies: 19Last Post: 07-26-2009, 03:59 AM
- By LankanSniper in forum AWT / SwingReplies: 3Last Post: 03-25-2009, 10:44 AM
- By roshithmca in forum AWT / SwingReplies: 1Last Post: 03-06-2008, 04:18 PM