Q. How would you detect a keypress in a JComboBox? (Solved)
1. Add a KeyListener to the JComboBox
2. Add a KeyListener to the JComboBox’s editor component
3. Either (a) or (b)
4. None of the above
- b. Add a KeyListener to the JComboBox’s editor component