void () { final ColumnInfo[] columnInfos = myTableModel.getColumnInfos(); for (int i = 0; i < columnInfos.length; i++) { final int width = getColumnPreferredWidth(i); if (width > 0) { myTable.getColumnModel().getColumn(i).setPreferredWidth(width); } } }