🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Updating a JTextArea

#8625
From: Paul Furbacher [TeamB]
Date: Thu, 03 Aug 2000 00:00
19 lines
1303 bytes
Jack wrote:

> I have a simple application composed of a JFrame with
> a JTextArea and a JButton. When I press the JButton,
> I do some iterative file processing which takes awhile.
> What I would like to do is "append()" the file name
> to the JTextArea after processing each file and have
> it immediately displayed in the JTextArea. What is happening
> is that it waits until the very end and then displays all
> the file names at once. Does anyone know how I can get
> the JTextArea to refresh itself after each append?

You have to spawn a separate thread to do the file processing.
Please read this article:

  http://java.sun.com/products/jfc/tsc/articles/threads/threads2.html


Paul Furbacher (TeamB)
Technical Details
Message-ID: <398A020D.451D26F1@home.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <8F85A7495jcookshelluscom@207.204.214.130>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,a12fbc0eea7dd5a
X-Google-Attributes: gid111d45,public
From: "Paul Furbacher [TeamB]" <pnf@home.com>
Subject: Re: Updating a JTextArea
Date: 2000/08/03
Message-ID: <398A020D.451D26F1@home.com>
X-Deja-AN: 654224652
Content-Transfer-Encoding: 7bit
References: <8F85A7495jcookshelluscom@207.204.214.130>
X-Accept-Language: en,pdf
Content-Type: text/plain; charset=us-ascii
Organization: Reverse Alchemy, Inc.
Mime-Version: 1.0
Reply-To: pnf@home.com
Newsgroups: borland.public.jbuilder.java.swing