Im attempting to get an array list contents in my controller passed through to my view to be displayed in the comboBox.
My current attempt consists of this method but when it runs nothing is shown in the combobox when im sure the arraylist has objects inside.
In the controller i have: where employees is the array list
public void setComboBox(){
view.setComboBox(employees);
}
in the view i have: where jPatientComboList is the combo box
public void setComboBox(ArrayList<Employee> employees) {
jEmployeeComboList.addItem(employees.get(employees.size()-1).getName());
}
I would like the combo box to display all names of the employees from the array list.