*
The moose likes Swing / AWT / SWT and the fly likes Enter Key Behavior Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Enter Key Behavior" Watch "Enter Key Behavior" New topic
Author

Enter Key Behavior

kyle amburn
Ranch Hand

Joined: Jul 29, 2001
Posts: 64
The JButtons in my swing application are performing different across the Microsoft platform. When the application is run on a computer using Win9x or Win XP the buttons do not respond to the enter key. On Windows 2000, the buttons do respond to the enter key.
All versions are running the same jre version. I might expect this kind of behavior from awt, but this shouldn�t happen with swing, should it?
I am using nested classes derived from AbstractAction to add the functionality. I would prefer not to have to add a KeyListener to each button and check for the Enter Key. Does anybody know why this would be occurring or have any suggestions to fix the cross platform problems?
Thanks,
Kyle
 
GeeCON Prague 2014
 
subject: Enter Key Behavior