I am sure that for many of you this is an easy question.
However I would like some help. I have a JList in the GUI class:
Object[] data = { "Emp1", "Emp2", "Emp3", "Emp4", "Emp5" };
JList empList = new JList(data);
empLis.setFixedCellWidth(400);
At the moment the data for the JList is populated from the same class as shown above.... However I have a method in the main class and I would like to populate my JList from it:
Main Class:
public String[] getAllPeople(){
}
I appreciate you help.
Thanks
However I would like some help. I have a JList in the GUI class:
Object[] data = { "Emp1", "Emp2", "Emp3", "Emp4", "Emp5" };
JList empList = new JList(data);
empLis.setFixedCellWidth(400);
At the moment the data for the JList is populated from the same class as shown above.... However I have a method in the main class and I would like to populate my JList from it:
Main Class:
public String[] getAllPeople(){
}
I appreciate you help.
Thanks