list_table.getColumnModel().getColumn(0).setPreferredWidth(20);
First you set only PreferredWidth to your first column, not the second. Do you also want preferredWidth for the second? Then you need to call the 2nd column.
Anyway, setting the width for the column uses the function setWidth()
For the second column, this is:
columnModel.getColumn(1).setWidth(100);
source
share