🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #15996

The Thread and the ProgressBar.

#15996
From: Jason C. Leach
Date: Tue, 13 Apr 1999 00:00
33 lines
1483 bytes
hi,

If in my main class (the one that starts the show) I have several
components, one being a JProgressBar.  In a child thread I read, filter,
and write a file; based on this I update my progress bar.

I need to pass progressbar into my thread (and I do via the
constructor), so the thread can update it.

I pass it into a constructor. Then I:
this.progressBar = progressBar; //I think this initializes the threads
obj, with that of
                                                    //the  original
progress bar from the parent.

In various methods I then try to set the value, and maximum value and
what not.  But the object on my main form does not update at all. Maybe
I need to synchronize it? Maybe I should be calling an update method?

This is JDK 1.2

Thanks,
    Jason.

--


�,+���+,��,+���+,�*
....Jason C. Leach
..."Many Hands Make Light Work."
..- Unknown

-- PGP key on server: pgpkeys.mit.edu
Technical Details
Message-ID: <37138342.382649F6@hotmail.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f74b3,ecc61bd7a969afed,start
X-Google-Attributes: gidf74b3,public
From: "Jason C. Leach" <leachjc@hotmail.com>
Subject: The Thread and the ProgressBar.
Date: 1999/04/13
Message-ID: <37138342.382649F6@hotmail.com>
X-Deja-AN: 466082496
Content-Transfer-Encoding: 8bit
X-Accept-Language: en
Content-Type: text/plain; charset=iso-8859-1
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language