🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.jbuilder.java.swing
4 messages
4 total messages Started by Peder Sk�nning Wed, 06 Oct 2004 12:45
ProcessMessages
#846
Author: Peder Sk�nning
Date: Wed, 06 Oct 2004 12:45
13 lines
1196 bytes
In Delphi I call

Application.ProcessMessages

when I want for instance a progresbar to show the progres of a batch 
database update. Otherwise the progressbar does not change untill the batch 
run is finished.

How do I force a repaint of a jProgressBar in jBuilder during a batch run?

Thanks in advance

Peder 
Re: ProcessMessages
#847
Author: Lori M Olson [TeamB]
Date: Wed, 06 Oct 2004 13:22
42 lines
2104 bytes
Peder Sk�nning wrote:

> In Delphi I call
> 
> Application.ProcessMessages
> 
> when I want for instance a progresbar to show the progres of a batch 
> database update. Otherwise the progressbar does not change untill the batch 
> run is finished.
> 
> How do I force a repaint of a jProgressBar in jBuilder during a batch run?
> 
> Thanks in advance
> 
> Peder 
> 
> 

This is a problem because your code is being invoked from the main GUI 
thread.  SwingUtilities.invokeLater was invented to solve this kind of 
problem.

http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html

-- 

Regards,

Lori Olson [TeamB]

------------

Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.

Google Advanced Newsgroup Search
     http://www.google.ca/advanced_group_search
Other Newsgroup Searches:
     http://www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
     http://www.visi.com/~gyles19/fom-serve/cache/1.html
Re: ProcessMessages
#848
Author: Peder Sk�nning
Date: Wed, 06 Oct 2004 13:52
27 lines
1583 bytes
>> In Delphi I call
>>
>> Application.ProcessMessages
>>
>> How do I force a repaint of a jProgressBar in jBuilder during a batch 
>> run?
>>
>
> This is a problem because your code is being invoked from the main GUI 
> thread.  SwingUtilities.invokeLater was invented to solve this kind of 
> problem.
>
> http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html
>
> -- 
>
> Regards,
>
> Lori Olson [TeamB]
>

This is more sticky than Delphi! Do I have to write a method that repaints 
the ProgressBar and then run it through invokeLater?

Thanks

Peder 
Re: ProcessMessages
#849
Author: Karl-Heinz Reng
Date: Wed, 06 Oct 2004 21:14
44 lines
1906 bytes
Hello,

look at this book,

Graphic Java Volume 2 Swing, 3 rd Edition from David M. Geary. On page 590
you will find
an example (Monitoring the Values of a Progress Bar). You must use Threads.

Regards

Karl-Heinz Reng
Reng-EDV

"Peder Sk�nning" <nospampax@nospampaxit.dk> schrieb im Newsbeitrag
news:4163f8b3$1@newsgroups.borland.com...
> >> In Delphi I call
> >>
> >> Application.ProcessMessages
> >>
> >> How do I force a repaint of a jProgressBar in jBuilder during a batch
> >> run?
> >>
> >
> > This is a problem because your code is being invoked from the main GUI
> > thread.  SwingUtilities.invokeLater was invented to solve this kind of
> > problem.
> >
> > http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html
> >
> > -- 
> >
> > Regards,
> >
> > Lori Olson [TeamB]
> >
>
> This is more sticky than Delphi! Do I have to write a method that repaints
> the ProgressBar and then run it through invokeLater?
>
> Thanks
>
> Peder
>
>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads