sbool tableSetColumnWidths_debug; static void tableSetColumnWidths(final JTable table, final Map widths) { swing { 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.setWidth(w); if (tableSetColumnWidths_debug) print("Setting width of column " + i + " to " + w); } } }} } static void tableSetColumnWidths(JTable table, O... widths) { tableSetColumnWidths(table, litorderedmap(widths)); }