|
-
January 2nd, 2003, 06:59 AM
#1
JTable JScrollPane rows visible : please help
Hi,
I need to put a JTable in a JscrollPane, so that there is only 10 rows of the JTable visible in the scrollpane...
if the JTable is put in a JFrame I can't managed to set the size of the JscrollPane to do that..
Does anybody know a way to do that ?
thanks a lot by advance,
Hélène.
Last edited by helenerom; January 2nd, 2003 at 07:03 AM.
-
January 3rd, 2003, 01:43 AM
#2
the size of the JScrollPane and therefor the sizr of the JTable depends on the used layoutmanager. So if you don't use some absolute layoutmanager (like nulllayout or xylayout which is borland specific) it's difficult to archive this.
You can play around with the table model so that it only returns 10 rows at a time, but then you have to implement the paging logic yourself.
Timo
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|