• Post Reply Bookmark Topic Watch Topic
  • New Topic

Scrollable JTable  RSS feed

 
Peter Phung
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can i make my Table scrollable?
This is the code that i have so far:

When the table is rendered it is placed within the scrollpane. This would be ok except that no scrollbars appear even when the table is obviously bigger than the viewable area.
Please can anyone help
[ April 18, 2002: Message edited by: Peter Phung ]
 
Sayed Ibrahim Hashimi
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see what's wrong with this code.
I created this test program and it ran fine

Maybe something else is causing the problem.
You can also try:

Hope this helps
 
Peter Phung
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, i should probably explain a bit more about my code.
My Table is rendered from a custom table model. The actual code i have is below :

I also tried to add the line :
public void setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS )
a scrollbar appeared in the scrollpane but didn't allow me to scroll around.
Please can anyone help
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!