i have this code to put a collection into a array then move the array to a JList to display it.

code complies without a problem but its just giving me an empty box anyone know whats up.

[code]
Collection<Department> d = Department.getCollection();
dept = new Department[d.size()];
String[] entry = new String[dept.length];
for (Iterator<Department> iter = d.iterator(); iter. hasNext(); )
for (int k=0; k<dept.length; k++) {
dept[k] = iter.next();
entry[k] = dept[k].getName();
}
JList deptList = new JList(dept);
deptList.setSelectionMode(ListSelectionModel.SINGL E_SELECTION);
panel.add(deptList);
JScrollPane deptListscroll = new JScrollPane(deptList, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
panel.add(deptListscroll);
[code/]

thanks in advance