faraq1
asked on
how yo populate a combo box in java using a loop of an aray of objects
how yo populate a combo box in java using a loop of an aray of objects
else if (e.getSource() instanceof JComboBox)
{
// JComboBox jBox = (JComboBox)e.getSource();
//itemSelected= (String) jBox.getSelectedItem();
index= jBox.getSelectedIndex();
jBox.addItem(cars[numVideo s].getMode l());
cars[numVideos]=new Car("Dodge","Viper","2003" ,3112.99);
jBox.addItem(cars[numVideo s].getMode l());
numVideos++;
}
else if (e.getSource() instanceof JComboBox)
{
// JComboBox jBox = (JComboBox)e.getSource();
//itemSelected= (String) jBox.getSelectedItem();
index= jBox.getSelectedIndex();
jBox.addItem(cars[numVideo
cars[numVideos]=new Car("Dodge","Viper","2003"
jBox.addItem(cars[numVideo
numVideos++;
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.