- tbl_summary.getColumn(wantedField.getName()).setMinWidth(
- wantedField.getMinWidth());
- tbl_summary.getColumn(wantedField.getName()).setMaxWidth(
- wantedField.getMaxWidth());
- tbl_summary.getColumn(wantedField.getName()).setPreferredWidth(
- wantedField.getPreferredWidth());
+ tbl_summary.getColumn(wantedField.getName())
+ .setMinWidth(wantedField.getMinWidth());
+ tbl_summary.getColumn(wantedField.getName())
+ .setMaxWidth(wantedField.getMaxWidth());
+ int prefedWidth = columnPrefs.get(wantedField.getName()) == null
+ ? wantedField.getPreferredWidth()
+ : columnPrefs.get(wantedField.getName());
+ tbl_summary.getColumn(wantedField.getName())
+ .setPreferredWidth(prefedWidth);