Another JTable question
I am trying to resize the widths of the columns in a JTable.
At present two of my column headings do not fit and the names trail off with ...
I would need to resize them when the program is running to see the full column header names - this is not really desirable
I have tried creating a header
JTableHeader header = table.getTableHeader();
and then typed
(and let Eclipse give me a list of availble commands associated with table headers but I dont see anything that is gonna do it for me)
I have also tried
But that just seems to ensure that if my table is wider than the frame it is contained in then I have a horizontal scrollbar to scroll to the columns that are off screen
How can I make the columns as wide as they need to be to display all the text?
Also, having done that I would like it if the user could not resize the columns themselves when the program is running.