🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #9436

Re: Default (Enter) button?

#9436
From: Petr Kozelka
Date: Fri, 17 Mar 2000 00:00
31 lines
1955 bytes
Yes, I saw your reply there, thanks - I think now I understand how to do it.

I wonder why something what should be used in each dialog is made so painful for programers. Perhaps the designers were people who
love constant switching between mouse and keyboard :-) so why should they support such keyboard nuances...

Regards,
Petr Kozelka



"John P. McGrath" <JPMcGrath@fast.net> wrote in message news:MPG.133a528958843b409897fc@forums.borland.com...
> 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: <8atfa4$3kb4@bornews.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <38CCCF1F.41F27E72@es.sigma.se> <8alppr$r041@bornews.borland.com> <u3dpsk6ar.fsf@sds.no> <8anh38$s163@bornews.borland.com> <MPG.133a528958843b409897fc@forums.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: "Petr Kozelka" <pkozelka@email.cz>
Subject: Re: Default (Enter) button?
Date: 2000/03/17
Message-ID: <8atfa4$3kb4@bornews.borland.com>
X-Deja-AN: 598771755
References: <38CCCF1F.41F27E72@es.sigma.se> <8alppr$r041@bornews.borland.com> <u3dpsk6ar.fsf@sds.no> <8anh38$s163@bornews.borland.com> <MPG.133a528958843b409897fc@forums.borland.com>
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
Organization: Another Netscape Collabra Server User
X-MSMail-Priority: Normal
Newsgroups: borland.public.jbuilder.java.swing