Article View: borland.public.jbuilder.java.swing
Article #10158Re: Getting focus in a JTextField
From: Ze'ev Bubis
Date: Wed, 03 Nov 1999 00:00
Date: Wed, 03 Nov 1999 00:00
29 lines
1369 bytes
1369 bytes
A component get the focus with requestFocus() only after it is visible. You must be sure that the dialog is visible when calling requestFocus(). Ze'ev Leo Cohen wrote: > 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:
<38204BD5.F7087520@nospam.globaloop.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<38161920.4814F842@cs.virginia.edu>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,35281d36553f78f1 X-Google-Attributes: gid111d45,public From: Ze'ev Bubis <zeevb@globaloop.com> Subject: Re: Getting focus in a JTextField Date: 1999/11/03 Message-ID: <38204BD5.F7087520@nospam.globaloop.com> X-Deja-AN: 543961402 Content-Transfer-Encoding: 7bit References: <38161920.4814F842@cs.virginia.edu> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: GlobaLoop LTD. Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing