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.