Thread: JComboBoxes
View Single Post
  #3 (permalink)  
Old 07-28-2008, 12:54 PM
Keerti Keerti is offline
Member
 
Join Date: Jul 2008
Posts: 5
Rep Power: 0
Keerti is on a distinguished road
Default
Hi
Thanks for the solution Hardwired.It works.
In continuation of the same UI program ..I have a few more Queries.
ComboBox[2] is present in tab2. The list for this combobox2 depends on the
value selected in combobox[1] which is present in tab1.
I have added an action listener on combobox1 .when the user selects the value, I get the list to be loaded for combobox2 in the form of a vector.
But I am not able to put this in the list for combobox2.that is i am not able to view it in the UI.The list for combobox2 remains blank

here is what I do:

listforcombo---is the vector that has to be loaded into combobox2
listforcombo = listofindevars.findependentValues(frameText,var_na me,frameText,(String) dependentVars.elementAt(i));

ComboBoxModel aModel = new DefaultComboBoxModel( listforcombo );
combolist[2].setModel(aModel);

Please help me in resolving this problem.
Reply With Quote