Array_Of_ListElement<ListElement> elements = new Array_Of_ListElement<ListElement>();
for (int i = 0; i < model.getSize(); i++ ) {
// Check to stop Swing Designer from crashing. CraigM: 02/08/2007
if (model.getElementAt(i) instanceof String) {
elements.add(new ListElement((String)model.getElementAt(i)));
}
else {
elements.add((ListElement)model.getElementAt(i));
}
}