Article View: comp.lang.java.gui
Article #88Re: A very humble Java GUI question
From: Bryan E. Sampieri
Date: Fri, 23 Mar 2001 16:00
Date: Fri, 23 Mar 2001 16:00
38 lines
2201 bytes
2201 bytes
Bill Tschumy wrote:
> On Wed, 21 Mar 2001 18:22:58 -0600, Paul King wrote
> (in message <rihibt42piiu8mbei09uc7o066ll4sramp@4ax.com>):
>
> > I am trying to build a GUI with a text object (JTextPane). I have a need
> > to place display text into that object. Here is the declaration:
> >
> > javax.swing.JTextPane txtMessage = new javax.swing.JTextPane();
> >
> > Having done that, in the same scope as the current object that the above
> > declaration was in, I placed this statement in one of the methods, a
> > response to pressing a button:
> >
> > txtMessage.text = "Some text";
> >
>
> >
> > PJK
>
> I don't have any advice about why CodeWarrior is showing that
> property, but to set the text displayed you should do a
>
> txtMessage.setText("Some Text");
>
> --
> Bill Tschumy
> Otherwise -- Austin, TX
> bill@otherwise.com
Probably it's showing all fields, of which "text" would probably be the private
or protected internal field to hold the string that is the text for the
textfield.
--
Bryan E. Sampieri
bryans@avaya.com
The opinions expressed are not necessarily those of Avaya.
Technical Details
Message-ID:
<3ABB730F.396C4F35@avaya.com>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!news.iac.net!news-out.cwix.com!newsfeed.cwix.com!newsfeed.mathworks.com!wn3feed!worldnet.att.net!207.24.196.41!nntphub.cb.lucent.com!news.research.bell-labs.com!newsReferences:
<rihibt42piiu8mbei09uc7o066ll4sramp@4ax.com> <01HW.B6DEC73B002ECDD50931E400@news.jump.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10fd6d,e3664f8ad80898dd X-Google-Attributes: gid10fd6d,public X-Google-Thread: fd047,e3664f8ad80898dd X-Google-Attributes: gidfd047,public X-Google-ArrivalTime: 2001-03-23 08:22:39 PST Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!news.iac.net!news-out.cwix.com!newsfeed.cwix.com!newsfeed.mathworks.com!wn3feed!worldnet.att.net!207.24.196.41!nntphub.cb.lucent.com!news.research.bell-labs.com!news From: "Bryan E. Sampieri" <bryans@avaya.com> Newsgroups: comp.lang.java.gui,codewarrior.windows Subject: Re: A very humble Java GUI question Date: Fri, 23 Mar 2001 11:00:15 -0500 Organization: Avaya Inc. Lines: 40 Message-ID: <3ABB730F.396C4F35@avaya.com> References: <rihibt42piiu8mbei09uc7o066ll4sramp@4ax.com> <01HW.B6DEC73B002ECDD50931E400@news.jump.net> NNTP-Posting-Host: whatever.dnrc.bell-labs.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.76 [en] (WinNT; U) X-Accept-Language: en