Article View: borland.public.jbuilder.java.language
Article #14760requestFocus in restricted JTextField
From: Tom.Eugelink
Date: Fri, 06 Aug 1999 00:00
Date: Fri, 06 Aug 1999 00:00
12 lines
857 bytes
857 bytes
How do I keep the focus in a JTextField? When the user exits the JTF, the lostFocus event is probably the best place to check the contents. However, using "requestFocus" (which according to the textbook should work) does not keep the focus in the JTF, when the contents is not valid. Should we use another event? Is there a better way to prevent the focus from leaving? Is there a better way to get the focus back to the textfield? Tom
Technical Details
Message-ID:
<37aae56c.14582097@forums.inprise.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,8304ad044c4ea685,start X-Google-Attributes: gidf74b3,public From: Tom.Eugelink@OVSoftware.com Subject: requestFocus in restricted JTextField Date: 1999/08/06 Message-ID: <37aae56c.14582097@forums.inprise.com> X-Deja-AN: 509586496 Organization: Another Netscape Collabra Server User Newsgroups: borland.public.jbuilder.java.language