Allowing the User to Resize a Column in a JTable Component
By default, a table allows the user to size its columns.
This example demonstrates how to disable this feature.
int rows = 3;
int cols = 3;
JTable table = new JTable(rows, cols);
table.getTableHeader().setResizingAllowed(false);
Post a comment