Good idea. The modal dialog does the trick exactly. Now why didn't I think of that.....
On Wednesday, October 24, 2001, at 09:05 AM, Wathen, Dave wrote: > You could pop up a modal dialog to show the progress bar. > > Regards > > Dave Wathen > Goldman Sachs Asset Management > 3rd Floor, Procession House > 55 Ludgate Hill > London EC4M 7JN > +44 (0)20-7774-2998 > Any sufficiently advanced technology is indistinguishable from magic. > (Arthur C. Clarke) > > > -----Original Message----- > From: Bill Tschumy [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, October 24, 2001 2:31 PM > To: [EMAIL PROTECTED] > Subject: Question on JProgressBar usage > > > I need to use a JProgressBar to display progress while saving a > large document. I'm running into the common problem that you need > to actually do the work outside the event thread so the progress > bar will update during the work. I have read about using > SwingWorker, but this really doesn't seem to solve my problem. > > I need to do a Save in response to a menu command. I need to > ensure that the save happens synchronously before other operations > could happen. If I use a separate thread to do the actual save, > the event thread will still run and I may get other user events > before the save is completed. The problem is that these other user > events may change the document while it is being saved. > > I could disable all commands until the save is done but this seems > like a heavy handed solution to solve a deficiency in > JProgressBar. I also tried using paintImmediately() after setting > the progress bar's value. This works, but the bar flickers like > double buffering isn't happening with paintImmediately. > > This must be a common problem. What is the accepted solution? > > Thanks. > -- > Bill Tschumy > Otherwise -- Austin, TX > [EMAIL PROTECTED] > > _______________________________________________ > Advanced-swing mailing list > [EMAIL PROTECTED] > http://eos.dk/mailman/listinfo/advanced-swing > > -- Bill Tschumy Otherwise -- Austin, TX [EMAIL PROTECTED] _______________________________________________ Advanced-swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/advanced-swing
