• Post Reply Bookmark Topic Watch Topic
  • New Topic

Scrollable JTable  RSS feed

 
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 ]
 
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
 
Try 100 things. 2 will work out, but you will never know in advance which 2. This tiny ad might be one:
ScroogeXHTML 7.1 - RTF to HTML5 / XHTML converter
https://coderanch.com/t/690611/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!