Article View: borland.public.jbuilder.java.swing
Article #847Re: ProcessMessages
From: Lori M Olson [TeamB]
Date: Wed, 06 Oct 2004 13:22
Date: Wed, 06 Oct 2004 13:22
42 lines
2104 bytes
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
Technical Details
Message-ID:
<4163f236$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<4163e8f0$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 111d45,a2dbf22cfcf04ab2 X-Google-Attributes: gid111d45,public X-Google-Language: ENGLISH,ASCII Date: Wed, 06 Oct 2004 07:22:07 -0600 From: "Lori M Olson [TeamB]" <javadragon@techie.com> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax; CDonDemand-Dom) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing Subject: Re: ProcessMessages References: <4163e8f0$1@newsgroups.borland.com> In-Reply-To: <4163e8f0$1@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit NNTP-Posting-Host: 142.179.181.200 Message-ID: <4163f236$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1097069110 142.179.181.200 (6 Oct 2004 06:25:10 -0700) Lines: 43 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail