How can I add an Item to a Combobox by using a JTextfield?
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
How can I add an Item to a Combobox by using a JTextfield?
How is that any different than what you figured out how to do in your other thread?
shep (April 3rd, 2014)
Well I'm sorry I usually figure things out when I ask them. So sorry man. But I was stuck on it for a couple of hours.
So did you figure it out? Read the item in the JTextField and add it to the JComboBox items, just as you did before. I'm just trying to understand how this is different than what you already know how to do. If it is, explain what you don't understand.
Oh no I understand it. It was that I had my if statement in the event handler in another if statement so it wouldn't work. And yes I figured it out. But since I have your attention. I have one more question. How can I delete a combobox item when I click a button?