CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2002
    Location
    paris
    Posts
    2

    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.

  2. #2
    Join Date
    Jun 1999
    Posts
    126
    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
  •  





Click Here to Expand Forum to Full Width

Featured