PLease help me in creating a ComboBox with textfield and dropdown list goes like this: When i type a text in the textfield and press "Enter" key,the typed text should be added to the dropdown.
Also the dropdown list should contain all the values entered in the previous page.
If I understood you well, you would attach ActionListener to your JTextField component. The event would be triggered when you enter text and press the Enter key. So accordingly, your actionPerformed(ActionEvent event) method would contain the code to get the text from the field and add it to JComboBox (and probably then clear the text field).
Did you try to implement anything so far? Nobody's going to provide a complete solution for you... Try to follow the directions above and if you have any more doubts feel free to ask again with the code you get.
The quieter you are, the more you are able to hear.
Joined: Nov 15, 2012
I didnt try anything still.I will write the code in actionPerformed() method and will let you know.