*
The moose likes Swing / AWT / SWT and the fly likes JTable Vertical Fill Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTable Vertical Fill" Watch "JTable Vertical Fill" New topic
Author

JTable Vertical Fill

Andrew Cho
Ranch Hand

Joined: Jun 29, 2011
Posts: 50
Hey all,

Does anyone know how to make a JTable fill a container vertically? I don't want to hard code the row size since my GUI needs to be resizable at runtime.

Thanks,
Andrew
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4523
    
    5

That depends what you mean by 'fill'. There's setFillsViewportHeight, but if what you want is to adjust the row height you could override getRowHeight() to return getParent().getHeight() / getRowCount().


luck, db
There are no new questions, but there may be new answers.
Andrew Cho
Ranch Hand

Joined: Jun 29, 2011
Posts: 50
Wow that second part was exactly what I was looking for. It works perfectly .

Thank you so much,
Andrew
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JTable Vertical Fill
 
Similar Threads
Refresing a JTable
JTable
jtable
Basic Question about JTable
JTable