JTable column minimum widths set to largest cell item or column header width
Posted on 2005-05-04
I have a JTable which can be created with anything from1 to 100 columns.
When there are a lot of columns I would like to have the minimum size
of each column set to the greater of a columns header size or the largest
cell size in that column.
I'll just rephrase this to make sure I understand myself:
Each column must size itself individually to a minimum width dictated by
the larger of: The width of the column header or the largest item in the column.
I always want to see the full column header and scroll horizontally as necessary.
Currently (by default I assume) my table shares the widths of all columns reducing them
to unreadable pencil-widths.