Check out this blog post which describes exactly what you seek.
Savvas Dalkitsis
2009-08-07 22:52:15
Check out this blog post which describes exactly what you seek.
Use JTable's method setAutoResizeMode
with one of the constants
AUTO_RESIZE_ALL_COLUMNS,
AUTO_RESIZE_LAST_COLUMN,
AUTO_RESIZE_NEXT_COLUMN,
AUTO_RESIZE_OFF,
AUTO_RESIZE_SUBSEQUENT_COLUMNS