Article View: borland.public.jbuilder.java.swing
Article #10206Getting focus in a JTextField
From: Leo Cohen
Date: Tue, 26 Oct 1999 00:00
Date: Tue, 26 Oct 1999 00:00
21 lines
1102 bytes
1102 bytes
I start up an application by soliciting a line of text information from the user. I do this with JDialog and JTextField. The control comes up just after I have put a menu on the screen. The problem is that the user has to move the mouse over the control in order to get focus. I've tried putting jTextField.requestFocus() before and after the jTextField.setVisible(true), but to no avail. Ideas? Solutions? -- Leo Cohen 116-1 Howard Drive Charlottesville, VA 22903 804-243-8922 (UVA) 804-244-4648 (home) 804-244-7922 (home fax) 815-550-9313 (office fax) lcohen@cs.virginia.edu
Technical Details
Message-ID:
<38161920.4814F842@cs.virginia.edu>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,35281d36553f78f1,start X-Google-Attributes: gid111d45,public From: Leo Cohen <lcohen@cs.virginia.edu> Subject: Getting focus in a JTextField Date: 1999/10/26 Message-ID: <38161920.4814F842@cs.virginia.edu> X-Deja-AN: 540923514 Content-Transfer-Encoding: 7bit Organization: Another Netscape Collabra Server User Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing