static void tableSetColumnWidthsByName(JTable table, Map widths) { TableColumnModel tcm = table.getColumnModel(); int n = tcm.getColumnCount(); for i to n: { TableColumn tc = tcm.getColumn(i); Int w = map.get(str(tc.getHeaderValue()); if (w != null) tc.setWidth(w); } }