Bookmark Topic Watch Topic
  • New Topic

Scrollpanes  RSS feed

 
colin shuker
Ranch Hand
Posts: 750
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi, I'd like to be able to put a JTable inside a ScrollPane, so that when the table is large, the scrollbars 'kick in', and when the JTable is small, I just get a small JTable.
Also I want to limit the size of the scrollpane to say 500 by 500.

I can sort of do it by using the number of rows and columns and cell sizes to work out the full table size, then if this is bigger than 500 by 500, I place it in a scrollpane of that size.
But it gets messy with say just 1 horizontal scrollbar, I cannot see all the rows as the scrollbar takes up space.

Is there a simple way to do this. Thanks for any help
 
Rob Camick
Ranch Hand
Posts: 2788
12
  • Mark post as helpful
  • send pies
  • Report post to moderator
The OP has already had plenty of help with topic in his last 2 postings. Before wasting time replying you might want to see what has already been suggested.
 
Michael Dunn
Ranch Hand
Posts: 4632
 
Rob Spoor
Sheriff
Posts: 21052
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Report post to moderator
Let's stick to the existing threads. Closing this one.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!