问题
I am having a problem on what to use and what to code if I want my combo box be generated once the user type a key...
like:
once i pressed letter "A" from keyboard inside the combo box, all items starting from letter "A" will show up from the drop down list.
How can I code this when:
items from the combo box came from my database and it's default value is the first item stored on my database.
Actually I don't have any idea how to code it. All I have was a template from JFrame.
Items from database were just drag to combo box and it automatically generate a class.
Please Help. Thanks in advance ^_^
回答1:
ok here is go two classes one for JComboBox and 2nd for JTextField (you are neede both) you can set for both if is strict (if Iten Exist) or not you can input any value as you wants here
much luck
来源:https://stackoverflow.com/questions/6386289/jframe-combo-box-event-key-help