Article View: borland.public.jbuilder.java.language
Article #18262Re: problem: how to set text into a textArea of another class???
From: Paul Furbacher
Date: Thu, 23 Jul 1998 00:00
Date: Thu, 23 Jul 1998 00:00
42 lines
1427 bytes
1427 bytes
Fa.Zeppelin wrote:
>
> hi there,
>
> I've created a frame1.class with a textArea1 inside a panel and a second
> class ' test.class' containing some strings.
> Now I want Strings from test.class displayed in the textArea1 of
> frame1.class
>
> How ??
>
> I tried:
>
>
> f1.textArea1.setText(testString);
>
> but nothing happened.
public class Frame1 extends ... { // "..." (ellipsis) means I don't have time
to write this part
TextArea textArea1;
...
}
public class Test {
public String one = "one";
public String two = "two";
public String three = "3";
...
}
Given the above, you would write:
Frame1 f1 = new Frame1();
Test test = new Test();
f1.textArea1.setText(test.one);
Paul Furbacher
Technical Details
Message-ID:
<35B78FE7.C1098A5B@bilbo.bio.purdue.edu>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<6p4fpu$m943@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,27b151933cb563fd X-Google-Attributes: gidf74b3,public From: Paul Furbacher <pf@bilbo.bio.purdue.edu> Subject: Re: problem: how to set text into a textArea of another class??? Date: 1998/07/23 Message-ID: <35B78FE7.C1098A5B@bilbo.bio.purdue.edu> X-Deja-AN: 374274799 Content-Transfer-Encoding: 7bit References: <6p4fpu$m943@forums.borland.com> To: "Fa.Zeppelin" <Fa.Zeppelin@micronet.de> Content-Type: text/plain; charset=us-ascii Organization: Biological Sciences, Purdue Univ. Mime-Version: 1.0 Reply-To: pf@bilbo.bio.purdue.edu Newsgroups: borland.public.jbuilder.java.language