🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #147

Re: Newbie need details for jProgressBar

#147
From: Doychin Bondzhev
Date: Wed, 05 Apr 2006 13:04
31 lines
2027 bytes
If you come from Delphi then you know that when you want to update some 
property in a VCL control you have to do this in the main thread and for 
that purpose in TThread you have Synchronize method that you use to call 
other methods which should be executed in the context of the main thread.

In java you have to follow the same rules but here it is a little bit 
different. The way it is done is by use methods called invokeLater and 
invokeAndWait

These 2 methods are static and are defined in SwingUtilities class.

Doychin

Zvonko wrote:
> hi!
> 
>     I would like some details in implemeting a jProgressBar while geting 
> data from database. It is very complicated for me to understand all this 
> thread stuff (i worked in Delphi before, and there you just give the 
> progressBar min, max and current value and it works). If someone would be so 
> kind to help me.
> 
>     I am working in JBuilder and am a newbie. I need an example how to use 
> progreesBar (or monitor) in a method inside a class, and call this method 
> from actionPerformed of a button!?
> 
> 
> Thanks guys.
> Zvonko 
> 
> 
Technical Details
Message-ID: <4433c072$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news2.volia.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <44336f97$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 111d45,4179958d51cc741f
X-Google-Attributes: gid111d45,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Wed, 05 Apr 2006 16:04:49 +0300
From: Doychin Bondzhev <doychin@dsoft-bg.com>
User-Agent: Thunderbird 1.5 (Windows/20051201)
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing
Subject: Re: Newbie need details for jProgressBar
References: <44336f97$1@newsgroups.borland.com>
In-Reply-To: <44336f97$1@newsgroups.borland.com>
Content-Type: text/plain; charset=windows-1251; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 217.10.246.225
Message-ID: <4433c072$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1144242290 217.10.246.225 (5 Apr 2006 06:04:50 -0700)
Lines: 31
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news2.volia.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail