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.

Results 1 to 5 of 5

Thread: How can I add an Item to a Combobox by using a JTextfield?

  1. #1
    Member
    Join Date
    Oct 2012
    Posts
    32
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default How can I add an Item to a Combobox by using a JTextfield?

    How can I add an Item to a Combobox by using a JTextfield?


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,520
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: 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?

  3. The Following User Says Thank You to GregBrannon For This Useful Post:

    shep (April 3rd, 2014)

  4. #3
    Member
    Join Date
    Oct 2012
    Posts
    32
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Re: How can I add an Item to a Combobox by using a JTextfield?

    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.

  5. #4
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,520
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: How can I add an Item to a Combobox by using a JTextfield?

    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.

  6. #5
    Member
    Join Date
    Oct 2012
    Posts
    32
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Re: How can I add an Item to a Combobox by using a JTextfield?

    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?

Similar Threads

  1. Replies: 2
    Last Post: April 3rd, 2014, 04:44 PM
  2. add combobox to swing
    By viral.bhat in forum What's Wrong With My Code?
    Replies: 1
    Last Post: March 18th, 2014, 03:27 AM
  3. display item for item selected in combobox
    By cisco.nat in forum AWT / Java Swing
    Replies: 1
    Last Post: June 20th, 2013, 07:12 AM
  4. add JTextField with a click of button
    By A4Andy in forum AWT / Java Swing
    Replies: 1
    Last Post: August 31st, 2011, 07:34 AM
  5. Replies: 3
    Last Post: June 1st, 2011, 12:47 AM