I'm trying to build an applet to edit mysql tables. I used a Jtable inside a JscrollPane but I would like to display only 3 or 4 columns at a time (I can have up to 40 !) and then let the user scrolls to the others with the horizontal scrollbar.
My problem is that all the columns are always displayed (width reduced to fit) in the scrollpane. How can I reduce the number of visible columns ?
Edited by: user1721669 on 16 sept. 2012 11:06
Random guess. Don't set any size (especially, preferredSize) on the JTable if it's within a JSCrollPane.
For better help (anything less random), please post an SSCCE (http://sscce.org).