Posted By:
Tim_Rohaly
Posted On:
Wednesday, May 16, 2001 10:36 AM
Your question strongly suggests that you don't understand
how to use
JTextArea and that you don't understand
much about the design of Swing. The
read() method
is to be used
only for initializing the component,
and not for keeping it up to date. All Swing components
keep their state in a data model - in the case of
JTextAreathis is an implementation of
Document. Modifying
the underlying data model is done through methods belonging
to the model.
The suggestion to use a piped stream is a bad one in this
context, although it will work just fine in general when piping
an output stream to an input stream.
I think you need to do some serious reading about Swing,
in particular about the Model/View/Controller pattern that
Swing uses. See the Swing FAQ for suggested references.