Article View: borland.public.jbuilder.java.swing
Article #12786JFrame Default focus Problem
From: Adam Chace
Date: Mon, 16 Nov 1998 00:00
Date: Mon, 16 Nov 1998 00:00
12 lines
1160 bytes
1160 bytes
Yet another focus question. I have a JFrame with a couple of JTextField's on it. I want a particular JTextField to have focus, a flashing caret and be ready for user input the moment it becomes visible. I can get it to have focus and a flashing caret, but the user must always click in the control or tab out and back into it to be able to actually begin entering text. I've tried getDefaultFocus(), grabFocus(), requestFocus() and I've even created my own Focus and MouseEvents and done a dispatchEvent...nothing seems to work. This is using Swing 1.0.3, the problem seems even worse with Swing 1.0.1. Any help would be greatly appreciated.
Technical Details
Message-ID:
<3650BACC.5365258@ultranet.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: 111d45,9878af0d635aaa30,start X-Google-Attributes: gid111d45,public From: Adam Chace <apogee08@ultranet.com> Subject: JFrame Default focus Problem Date: 1998/11/16 Message-ID: <3650BACC.5365258@ultranet.com> X-Deja-AN: 412523678 Content-Transfer-Encoding: 7bit X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Apogee Information Systems Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing