Setting the width of a JTable column

you should do something like this:

   TableColumn column=jTable1.getColumnModel().getColumn(1);
   column.setMinWidth(0);
   column.setMaxWidth(300);
   column.setPreferredWidth(15);

Setting

column.setMinWidth(0);
column.setMaxWidth(300);

is not nessesary, but you’ll be sure that desired width fits in this range.