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 3 of 3

Thread: JCombo Box to populate 2 JTextFields

  1. #1
    Junior Member
    Join Date
    Dec 2011
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default JCombo Box to populate 2 JTextFields

    Hello Everyone,

    I want to have a JComboBox that has 3 options:

    7 Years at 5.25%
    15 Years at 5.5%
    30 Years at 5.75%

    I also have two JTextFields; one is for percentage and the other is for years. What I want to do is populate the text fields depending on what choice is selected.

    For Example: the user chooses 7 Years at 5.25%, this will cause the JTextField for years to populate with 7 and the JTextField for percentage to populate with 5.25

    Current I have two separate JComboBoxes to do this, one for years and one for percentage. I just want to see if it is possible to combine this functionality into one for experimental and learning purposes. Thanks.


  2. #2
    Junior Member
    Join Date
    Dec 2011
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: JCombo Box to populate 2 JTextFields

    I just wanted to let everybody know that I have figured it out. You guys have been extremely helpful by not acknowledging my post, let alone providing suggestions or feedback of any sort. Keep up the good work.

  3. #3
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,297
    Thanks
    180
    Thanked 824 Times in 767 Posts
    Blog Entries
    5

    Default Re: JCombo Box to populate 2 JTextFields

    Quote Originally Posted by jdubicki View Post
    I just wanted to let everybody know that I have figured it out. You guys have been extremely helpful by not acknowledging my post, let alone providing suggestions or feedback of any sort. Keep up the good work.
    Getting answers is highly dependent upon how you ask the question. So in essence, I see the above as a cynical and sarcastic comment pointing directly back at yourself. Contributors that don't see it this way...well many of us have good memories, and remember who is appreciative of the time unpaid volunteers given and those who are not.

Similar Threads

  1. [SOLVED] JCombo box
    By say what in forum AWT / Java Swing
    Replies: 0
    Last Post: April 10th, 2012, 02:57 PM
  2. Java 3 JCombo Box Problem
    By kpat in forum AWT / Java Swing
    Replies: 0
    Last Post: March 21st, 2012, 05:08 AM
  3. Creating an Applet program using JTextFields, JLabel, Jbutton.
    By Maxly in forum Java Theory & Questions
    Replies: 1
    Last Post: March 9th, 2012, 01:39 PM
  4. Input and Output in JTextFields and JTextAreas - Interactive Fiction
    By lucienmontierre in forum AWT / Java Swing
    Replies: 1
    Last Post: April 27th, 2011, 08:14 AM
  5. Populate an Object with Other Objects
    By EmSaint in forum Object Oriented Programming
    Replies: 2
    Last Post: October 25th, 2010, 12:45 AM