Article View: borland.public.jbuilder.java.language
Article #15988OK, now I need a Thread.
From: Jason C. Leach
Date: Mon, 12 Apr 1999 00:00
Date: Mon, 12 Apr 1999 00:00
33 lines
1658 bytes
1658 bytes
hi,
My applet is coming along nicely. Thanks to this news group. One think
I am going to need, I think, is a thread. Here is what my app does.
Opens an input file. (FileChooser, File, and FileInputStream).
Creates and output file. (FileChooser, File, and FileOutputStream).
The processes the file when a button is clicked. (Read(), Check(),
Write()).
The processing consists of a method that reads in byte, passes to a
function that checks it, then it is either written to the output file or
not. This process makes my Applet (or JFrame) unusable for the duration
of the processing. Until the file is finished. I'd like the Applet to
be more responsive during this time, be able to repaint (if the window
is covered by another, then uncovered), and a progress bar to be
updated, o and maybe a cancel button later.
I am thinking I should put the checking procedure in a Thread. Does
this sound like the best way to handle this problem?
Thanks,
Jason
--
�,+���+,��,+���+,�*
....Jason C. Leach
..."Many Hands Make Light Work."
..- Unknown
-- PGP key on server: pgpkeys.mit.edu
Technical Details
Message-ID:
<3712C69C.A921A9B0@hotmail.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: f74b3,e8e45b2956d295c6,start X-Google-Attributes: gidf74b3,public From: "Jason C. Leach" <leachjc@hotmail.com> Subject: OK, now I need a Thread. Date: 1999/04/12 Message-ID: <3712C69C.A921A9B0@hotmail.com> X-Deja-AN: 465752044 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