I want to add a progressBar (just to show that something is happening) when the database rows are fed into a table.
First I tried to create a frame, where I added progressBar. I called frame.visible in the while loop which populates the table with database datas. But the frame doesn't show till all the rows are in the table. So it shows too late.
Then I tried to add the progressBar to a dialog, but that was even worse: the dialog shows, but it didn't do anything in background- I have to close that dialog, and then the table is loaded with data...
ForceStr
0
Newbie Poster
Recommended Answers
Jump to Postyou will have to launch the JFrame in a different thread if you want the progress bar to fill and the table to fill at the "same time", otherwise your program is gonna do one then the other.
I haven't played with Threads in a bit but i can …
All 4 Replies
Philippe.Lahaie
42
Posting Whiz in Training
dantinkakkar
19
Junior Poster
ForceStr
0
Newbie Poster
dantinkakkar
19
Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.