I am trying to set the size of a table in Java.
pTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
pTable.getColumnModel().getColumn(0).setPreferredWidth(120);
pTable.getColumnModel().getColumn(1).setPreferredWidth(100);
The table is in the correct position in my frame but there is this unnecessary blank space to the right of the last column. This is what I get:
I would just like to eliminate that blank white space that is to the right of the first name column.
Please don't lock this question, there is a similar one out there but it did not have any info that was of any help to me.