I followed some tips in this guide: http://stackoverflow.com/questions/2452694/jtable-horizontal-scrollbar-in-java but still having problems.
I have two column headers: Name and Description (for our purposes in this ex.)
I want to be able to scroll horizontally whenever an entry is added (ie: Name/Description is just 1 line). However, Swing doesn't seem to default to that behavior!
I have a JTable embedded in a ScrollPane. JScrollPane has the following parameters: JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED and JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED
If I disable with: myTable.AutoResizeMode(AUTO_RESIZE_OFF)
the column headers don't fill up the whole table (maybe just 1/2 of the table). I have to manually resize the "Description" Column to see the whole thing.
How can I have autoresizing, but the horizontal scrolling still works?