Hokester
asked on
JComboBox Key Event Selection
I have a JComboBox that I want to respond to key events for selecting the item in the list.
For instance:
Vector people = new Vector();
people.add("Sam");
people.add("Sarge");
people.add("Sawyer");
people.add("Sean");
people.add("Shawn");
people.add("Steven");
JComboBox comboBox = new JComboBox(people);
When you select the Combo box and press the letter "S" it goes to Sam. However when you press "Saw", it does not go to Sawyer. Is there a way to do this? I wasn't sure what this technique is really called otherwise I would have googled it more.
Thanks!
For instance:
Vector people = new Vector();
people.add("Sam");
people.add("Sarge");
people.add("Sawyer");
people.add("Sean");
people.add("Shawn");
people.add("Steven");
JComboBox comboBox = new JComboBox(people);
When you select the Combo box and press the letter "S" it goes to Sam. However when you press "Saw", it does not go to Sawyer. Is there a way to do this? I wasn't sure what this technique is really called otherwise I would have googled it more.
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER