//sbool tableSetColumnWidths_debug; static void tableSetColumnWidths(JTable table, Map widths) { pcall { TableColumnModel tcm = table.getColumnModel(); int n = tcm.getColumnCount(); for i to n: { TableColumn tc = tcm.getColumn(i); Int w = widths.get(str(tc.getHeaderValue()); if (w != null) { tc.setPreferredWidth(w); /*if (tableSetColumnWidths_debug) print("Setting width of column " + i + " to " + w);*/ } } } }