🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #18171

Re: How to get the current textfield value when typing

#18171
From: Michael Mitiaguin
Date: Tue, 04 Aug 1998 00:00
42 lines
1868 bytes
JBCL textfield control with textValueChanged event provides this
functionality.

Michael Mitiaguin wrote:

> Hello ,
>
> I'd like to get the current Swing textfield value after each keystroke.
> For the fragment which is given below I have one symbol delay. For
> instance after typing "12"   getText returns "1".
>
>     jTextField1.addKeyListener(new java.awt.event.KeyAdapter() {
>
>       public void keyTyped(KeyEvent e) {
>         jTextField1_keyTyped(e);
>       }
>     });
>
>   void jTextField1_keyTyped (KeyEvent e) {
>
>     System.out.println ( jTextField1.getText() ) ;
>
>    }
>
> Thanks.
>
> --------------------------------------------------------------------
> Michael Mitiaguin
> Software Engineer
> Digerati
> Email:  michael@digerati.com.au
> --------------------------------------------------------------------



--
--------------------------------------------------------------------
Michael Mitiaguin                       12 Strathalbyn St, East Kew
Software Engineer                         3102, Victoria, Australia
Digerati                                       Tel: +61 3 9859 5800
Email:  michael@digerati.com.au                Fax: +61 3 9859 5633
--------------------------------------------------------------------
Technical Details
Message-ID: <35C6AD0E.88B9452D@digerati.com.au>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <35C11376.2E0C2ABB@digerati.com.au>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,2f375eb33ec1da49
X-Google-Attributes: gidf74b3,public
From: Michael Mitiaguin <michael@digerati.com.au>
Subject: Re: How to get the current textfield value when typing
Date: 1998/08/04
Message-ID: <35C6AD0E.88B9452D@digerati.com.au>
X-Deja-AN: 377740639
Content-Transfer-Encoding: 7bit
References: <35C11376.2E0C2ABB@digerati.com.au>
Content-Type: text/plain; charset=us-ascii
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language