🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: aus.computers.java
Article #928

Re: AWT Text fields

#928
From: Cannon
Date: Mon, 20 Mar 2000 00:00
24 lines
1536 bytes
TextField tf = new TextField();
tf.setText("blah");
//Select to be placed in the focus handler
tf.selectAll();


Trembath <danielt@ihug.com.au> wrote in message
news:danielt-60C06E.15005919032000@news.mel.ihug.com.au...
> When switching focus to a text field, be it by the user, or the program,
> how do you make it select all the text?
>
> ie. like when you click on the address bar in netscape, by default all
> the text is selected, so you can just start typing and it will replace
> everything that is there.
>
> I've got a little applet where im constantly tab'ing back over fields to
> replace their contents, and i have to delete the values manualy each
> time...quite frustrating after a while.
>
> Any ideas?
>
> TIA
>
> -Daniel
Technical Details
Message-ID: <vEiB4.84$Pl1.7440@nsw.nnrp.telstra.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <danielt-60C06E.15005919032000@news.mel.ihug.com.au>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d6db,fcce5afc08d9224c
X-Google-Attributes: gid10d6db,public
From: "Cannon" <cannon@nospam.basketball.net.au>
Subject: Re: AWT Text fields
Date: 2000/03/20
Message-ID: <vEiB4.84$Pl1.7440@nsw.nnrp.telstra.net>
X-Deja-AN: 599810260
References: <danielt-60C06E.15005919032000@news.mel.ihug.com.au>
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
X-Complaints-To: abuse@telstra.net
X-Trace: nsw.nnrp.telstra.net 953530011 203.35.100.252 (Mon, 20 Mar 2000 16:26:51 EST)
Organization: Customer of Telstra Big Pond Direct
X-MSMail-Priority: Normal
Reply-To: "Cannon" <cannon@nospam.basketball.net.au>
NNTP-Posting-Date: Mon, 20 Mar 2000 16:26:51 EST
Newsgroups: aus.computers.java