This week's book giveaway is in the
We're giving away four copies of a choice of
"Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac"
and have Joe Kissell on-line!
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Take Control of Upgrading to Yosemite
Take Control of Automating Your Mac
this week in the
Swing / AWT / SWT
Press ENTER and ignit activate the button
Joined: Sep 10, 2004
Apr 03, 2005 18:18:00
Say I have a text field (search) and a button ("Get It"). the user simply put info in the jtextfield and intuitively he presses ENTER to proceed. how do i do that?
I tried getIt.getRootPane().setDefaultButton(getIt); but i get a
I don't know how to get the root frame :-(
any idea how to solve it?
Joined: Jul 11, 2001
Apr 04, 2005 08:26:00
One way is to add an actionListener to your
and have it call the same method your
's actionListener calls.
GenRocket - Experts at Building Test Data
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
subject: Press ENTER and ignit activate the button
SET A BUTTON AS "DEFAULT"
Keypressing on console or Dos prompt
coding for response to enter button on keyboard
KeyListener for a button?
Sign in button
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014