• Post Reply Bookmark Topic Watch Topic
  • New Topic

Displaying a progress dialog

 
MSD
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am trying to create a ProgressBar Dialog that will pop-up and display the progress when i try to access data from a url. I have a main frame from where i want to be able to pop-up this progress dialog. What happens is that the progress bar does not refresh till the data has been fetched from the url.
All help is appreciated.
Thanx.
 
Dan Cranmer
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mohammed,
Sorry about the late response (over a year since the original post). But, except for the problem on line 47, (<paramNames was interpreted as an html tag) I had to change it to "for (int i=0; i<paramNames.length; i++)". It seems to work when changing the super call in the constructor on line 14, from modal to non-modal, "super(parent, "Progress...", false);" It must be that a modal JDialog object is blocking everything else.
--Dan
 
MSD
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Dan,
Thanx a lot for the reply(even if it came after a year)
Well, the dialog needs to be modal, we don't want the user to do anything till a response comes back from the URL.
We finally had to use multi-threading for this one. What happens it that the modal dialog blocks the main thread. So instead, we initialize the dialog in a separate thread. Then, the main thread keeps running and the GUI is properly refreshed.
Thanx once again.
Regards,
Mohammed.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!