This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JTable Vertical Fill  RSS feed

 
Andrew Cho
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5167
11
Java Netbeans IDE Opera
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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().
 
Andrew Cho
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wow that second part was exactly what I was looking for. It works perfectly .

Thank you so much,
Andrew
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!