Link to home
Start Free TrialLog in
Avatar of faraq1
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[numVideos].getModel());

                           cars[numVideos]=new Car("Dodge","Viper","2003",3112.99);

                     jBox.addItem(cars[numVideos].getModel());


                              numVideos++;
                        }
ASKER CERTIFIED SOLUTION
Avatar of rk_radhakrishna
rk_radhakrishna

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial