You may want to try the following:

In your container: getRootPane().setDefaultButton(okButton). 

Note: I assume you have a button called "OK" (okButton) on your GUI. When
you select an item in your combobox and hit "ENTER", it acts like clicking
the OK button.

Hope this may give you some help.

Ancheng Ma
White Rock Networks, Inc.
Dallas. 

-----Original Message-----
From: Preeti Pujni [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 05, 2001 5:10 AM
To: [EMAIL PROTECTED]
Subject: Combo Box


Hi , 

I have a  Editable Combo Box with an action listenser added to it. 
I want the event to fire only on Enter key but that does not happen. 
I have added the KeyListener also but it does not work. 

Can u tell me how can i do that ? 

Preeti 


_______________________________________________
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing
_______________________________________________
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing

Reply via email to