Hi All, when i select one value in Combobox than second combobox contains the value related to the first one combobox value selection. kindly help me... i have searched Api but i didnt find.. Thanks in advance [ November 07, 2003: Message edited by: sandhiya Laghari ]
Hi Sandhya, From your description, what I understood is there are 2 comboboxes, and when you select an item in Ist Combobox, you have to select an item in the other one - right.. If so, add an ItemListener to the Ist Combobox, and in itemStateChanged(), write your logic to select the corresponding item in the second Combobox.
Joined: Sep 25, 2003
Dear Vijay i want to do this:
Now when i select numbers in first combobox than combo2 contain array of numbers. yes through actionListener but how.. thanx for help
Dear Sandhya In action performed event use if (String) combo1.getSelectedItem()=="numbers" then combo2.add(array1()) else combo2.add(array2()) or you can also use getSelectedIndex method of comboboxes which return an integer value starting index value from 0. Richa.
subject: How.....change combobox1 value ....combobox2 contain value related to that....