🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Default (Enter) button?

#9418
From: Tor Iver Wilhelmsen
Date: Wed, 15 Mar 2000 00:00
18 lines
993 bytes
"Petr Kozelka" <pkozelka@email.cz> writes:

> Isn't there any more elegant way ?
> What if I have twenty text fields in the form ? And it is not so unusual...

The alternative is to alter the JTextFields' Keymap - which is less
elegant. :-)

But what's so unelegant about

ActionListener act = new ActionListener() {
  // Implementation
};


   okButton.addActionListener(act);
   jTextField1.addActionListener(act);
   // ...
Technical Details
Message-ID: <uvh2oimof.fsf@sds.no>
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>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,47068b53b479f796
X-Google-Attributes: gid111d45,public
From: Tor Iver Wilhelmsen <tor.wilhelmsen@sds.no>
Subject: Re: Default (Enter) button?
Date: 2000/03/15
Message-ID: <uvh2oimof.fsf@sds.no>
X-Deja-AN: 597740520
Sender: towi@SDSA1761
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