• Post Reply Bookmark Topic Watch Topic
  • New Topic

JScrollPane Settings

 
Aran Winters
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've got a JTable inside my JScrollPane, but I am having trouble getting
the viewport and scrollbars working correctly.
So here's some code:

So, I've tried to change the JTable preferred size, and I've also
constructed the JScrollPane with horizontal and vertical scrollbars.
But, what I get is a table where everything is crammed into the width
of the viewport (I was hoping that the horizontal scroll would allow
me to traverse the table).
Thanks.
 
Craig Wood
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Aran Winters
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, I appreciate that example.
Turned out to be the autoResizeMode.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!