C progress bar not updating who is abby elliott dating
I actually tried that the other day and maybe I coded it incorrectly but it did not work. Actually that code looks similiar to the code I have now except that the Swing Worker replaces the Thread and you add a Property Change Listerer to the progress bar.
I'll try it again anyway but at this point I'm starting to wonder if this has a solution.
I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing.
Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.
Bar Objects I changed Progress Thread to the following: class Progress Thread extends Thread Also I added the following method: public void update Progress(int value) My loop is now the following: for (int i = 0; i As i mentioned earlier, the updating of the gui must be done on the gui thread and the time consuming task must run in its own thread.
All you need to do is adapt the second example i posted to your case and all the threading will be taken care of But would not the updating of the progress bar be in this different thread as well because it's inside the loop?
It is fine that it takes a bit of time, it is understandable, but how about showing the user the progress WITHOUT tying up their user interface (so they can do other things)?
Thanks Now I have the following : class Progress Thread implements Runnable In the code where the main GUI thread runs I create and show the Dialog that has the progress bar and then I do: Thread t = new Thread(new Progress Thread()); t.start(); The dialog progress bar still does not display properly.
It looks like the only thing you are threading is the set Visible for the Dialog which would put the dialog in a separate thread.
I noticed with that code it works fine also if you remove the thread and just use set Visible(true) as long as you don't make the dialog modal. Objects, Today I used the code from the link you gave me at fact I went into my class and commented out everything else and then just has a method with that code minus the JFrame.
We have had a few questions on the board in recent times asking about the best way to show the progress of a long running process; such as file reading of a HUGE file.
If you have a file with tens or hundreds of thousands of lines, or datasets which may have millions of records, it is going to take some time to process.