public final SpreadSheetFieldArray getFieldArrayWithWidths(ArrayList fieldArray) {
if (fieldArray == null)
fieldArray = getFieldArray();
// the widths don't work now anyway, and someone had a crash due to code below
SpreadSheetColumnModel cols = (SpreadSheetColumnModel)getColumnModel();
ArrayList<Integer> colWidths=new ArrayList<Integer>(cols.getColumnCount());
colWidths.add(-1); //id column ignored
for (int i=0; i < cols.getColumnCount(); i++)
colWidths.add(cols.getColumn(i).getWidth());
((SpreadSheetFieldArray)fieldArray).setWidths(colWidths);
return (SpreadSheetFieldArray) fieldArray;
}