I checked the questions on stackoverflow concerning getting horizontal scrolling on a JTable to work. Setting AUTO_RESIZE_OFF does get me the horizontal scroll bar but at the same time the table does not utilize the full width of the scroll pane.
I did some reading and it turns out this has been a running bug since 1998 (Will Oracle fix this?)
I saw some suggestions about over riding methods etc but none worked for me. So does anyone have an answer? It would be much appreciated. Basically I need the table to auto resize but enable the horizontal scroll bar before any of the column names get compressed.
Thanks.
after ranting against the other answers - JXTable (in the SwingX project) has an additional column layout property which
There's a bit of internal tweaking needed, so (biased me) would suggest to use the JXTable. Or have a look at its code and c&p - all allowed, all open source :-)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With