• Post Reply Bookmark Topic Watch Topic
  • New Topic

varying JTable Row Height, not Homogeneously

 
Venkata Cherukuri
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I have my JTable display varying Row Height. This one should work the same way as Excel- where in You drag a row and it's height increases.
 
VIJAY Yadlapati
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can change the height of a row programatically using setRowHeight(). I think you have to implement drag-drop for your requirement.
 
Jose Botella
Ranch Hand
Posts: 2120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch Venkata.
This program can resize row height either dragging or via ctrl-s when only one row is selected.

On page 591 of Swing 2nd ed. by Robinson and Vorobiev there is an example of a table whose rows adjust automatically to the height of multiple line of text introduced.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!