I created a JFrame that contain JComboBox and JButton.
When the user will press ENTER action event should run , the problem is it happen only after the second press on the ENTER since the first press will remark the text in the JComboBox and the second will activate the button action event.
If the action you want to run is the same which should be triggered on the click of the button, check out JFrame#getRootPane#setDefaultButton(JButton button)
Can you try, after making it the last line of your constructor?
Just noticed you are having an action listener as well as a key listener. Why is that? If you are effectively calling the same method as defined in action performed,please take out the key listener. You don't need it.
I delete this line the Key Listener and change the position but still I need to press twice on the ENTER (first press will mark the text in the field and the second press will activate the button action event).