Here is the scenario: I have a table in database with 3 columns (id, name, age). I've created 3 swing comboboxes and a button that sends a "select statement" to the database and fills the comboboxes out with addItem(...)
.
Now i wanna know how to link comboboxes such that when I select a value from lets say, the second combobox that fetches "name", the appropriate "age" value appears in the third combobox.
My ActionEvent for the button:
jComboBox1.addItem(search.getInt("ID"));
jComboBox2.addItem(search.getString("NAME"));
jComboBox3.addItem(search.getString("AGE"));
** search
is the ResultSet I acquire!
Thanks in advance.