public void updateComboBox(JComboBox<TrainSchedule> box){
  box.removeAllItems();
  for (  TrainSchedule sch : getSchedulesByNameList()) {
    box.addItem(sch);
  }
}

public void updateComboBox ( JComboBox < TrainSchedule > box ) { box . removeAllItems ( ) ; for ( TrainSchedule sch : getSchedulesByNameList ( ) ) { box . addItem ( sch ) ; } }
update a jcombobox with the latest schedules .
