Article View: borland.public.jbuilder.java.swing
Article #11663Re: Communication between classes
From: Feldewert
Date: Fri, 16 Apr 1999 00:00
Date: Fri, 16 Apr 1999 00:00
55 lines
2832 bytes
2832 bytes
Dies ist eine mehrteilige Nachricht im MIME-Format. --------------E9EC3EFAD57CE6CD9B8B094E Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi Bob, did you try Listeners ? I managed the communication by using listener methods in the classes. After that I was able to exchange data between them. This may help. Felde Bob Hunter schrieb: > I cannot figure out how to set new text in an object (text component or > label) created in a JFrame from a JDialog. For example, to simplify things > I have used the visual designer to create an application with a frame > containing a JTextArea and a JButton, both declared with package scope. > When the user clicks the button in the frame, a dialog (in the same package) > is displayed which also has a JButton and JTextArea. When the button in the > dialog is clicked, I would like the dialog to disappear (which is does) and > the text I can get from the textarea in the dialog (using the getText > method) to appear in the textarea in the frame (using the setText method). > I can get text from either textarea and place it in a database just fine > but I cannot move text between the two objects. I have tried simply calling > frameTextArea.setText from the dialog and I have tried passing the text as a > argument into a public method in the frame (and it makes it according to > calls to System.out.println), but the text will not show up in the textarea > in the frame. What am I doing wrong? I can set new text in a frame > textarea obtained from selected nodes in a tree within the frame (using > methods in the frame class) just fine, but the frame textarea acts "dead" > from outside the frame class. An example would be helpful. Thanks. --------------E9EC3EFAD57CE6CD9B8B094E Content-Type: text/x-vcard; charset=us-ascii; name="Felde.vcf" Content-Transfer-Encoding: 7bit Content-Description: Visitenkarte f�r Feldewert Content-Disposition: attachment; filename="Felde.vcf" begin:vcard n:Feldewert;Michael x-mozilla-html:FALSE org:futronic GmbH - Germany;Feel free to contact us ! adr:;;;;;; version:2.1 email;internet:Felde@Bigfoot.de title:Development Engineer fn:Michael Feldewert end:vcard --------------E9EC3EFAD57CE6CD9B8B094E--
Technical Details
Message-ID:
<3716F096.B3747732@email.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7f5q2r$jgc19@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,1ba1cbffbb4ed663 X-Google-Attributes: gid111d45,public From: Feldewert <Felde@email.com> Subject: Re: Communication between classes Date: 1999/04/16 Message-ID: <3716F096.B3747732@email.com> X-Deja-AN: 467033986 References: <7f5q2r$jgc19@forums.borland.com> X-Accept-Language: de Content-Type: multipart/mixed; boundary="------------E9EC3EFAD57CE6CD9B8B094E" Organization: futronic GmbH, GERMANY Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing