// Simply divide the number of columns by 100 and produce an evenly numbered column widths
int columns = list.getLength();
int columnSize = 100 / columns;
int remainder = 100 % columns;
// Traverse through the columns and reset with the new caculated value
StructureStylesheetUserPreferences ssup = userPrefs.getStructureStylesheetUserPreferences();
for (int i=0; i < list.getLength(); i++){
Element c = (Element) list.item(i);
String nId = c.getAttribute("ID");
ssup.setFolderAttributeValue(nId, "width", (i == (list.getLength() - 1) ? columnSize+remainder+"%" : columnSize+"%"));
}
}