Article View: borland.public.jbuilder.java.swing
Article #9435Re: Default (Enter) button?
From: John P. McGrath
Date: Fri, 17 Mar 2000 00:00
Date: Fri, 17 Mar 2000 00:00
20 lines
1332 bytes
1332 bytes
On Wed, 15 Mar 2000 09:23:21 +0100, Petr Kozelka wrote: > Isn't there any more elegant way ? > What if I have twenty text fields in the form ? And it is not so unusual... The most elegant way I have found (using your definition of elegant) was to write a utility method that traverses the component hierarchy and registers a key binding on all JTextFields that it finds. This is still not ideal, especially when you have some complex dialogs that dynamically add new panels containing JTextFields. But it is the best solution that I could find. Did you see my reply to your previous post? It contains some more detailed information on this problem. The title was "Re: how to control focus ?". -- John P. McGrath <JPMcGrath@fast.net> <jpm@nscs.fast.net>
Technical Details
Message-ID:
<MPG.133a528958843b409897fc@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<38CCCF1F.41F27E72@es.sigma.se> <8alppr$r041@bornews.borland.com> <u3dpsk6ar.fsf@sds.no> <8anh38$s163@bornews.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,47068b53b479f796 X-Google-Attributes: gid111d45,public From: John P. McGrath <JPMcGrath@fast.net> Subject: Re: Default (Enter) button? Date: 2000/03/17 Message-ID: <MPG.133a528958843b409897fc@forums.borland.com> X-Deja-AN: 598655765 References: <38CCCF1F.41F27E72@es.sigma.se> <8alppr$r041@bornews.borland.com> <u3dpsk6ar.fsf@sds.no> <8anh38$s163@bornews.borland.com> Organization: Another Netscape Collabra Server User Newsgroups: borland.public.jbuilder.java.swing