Forums Register Login

Scrollable JTable

+Pie Number of slices to send: Send
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 ]
+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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
Doody calls. I would really rather that it didn't. Comfort me wise and sterile tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1437 times.
Similar Threads
jtable
Removing a jtable from a jpanel/Changing the table
JTable
JTable - JDBC - Vectors
JTable(!!!)
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 08:08:08.