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

possible to set different heights for rows in a JTable?  RSS feed

 
Axel Janssen
Ranch Hand
Posts: 2166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
you can set the row height only globally with jTable.setRowHeight(int i).
O.k. I could implement a JTextArea in a JSrollPane as table cell renderer, I think. Then the element is atleast is scrollable if it exceeds the limits of the cell.
Or/and insert new rows in the model, in case of needing more space.
But does anyone knows if there is a possibillity to get for example table row height with 16 pixels in first row and row heigth with 32 pixels in second row?
And in swt/jface? Can we set there the table height only globaly? Or does it give more flexibility to the developer.
Thanks Axel
[ July 21, 2003: Message edited by: Axel Janssen ]
 
Axel Janssen
Ranch Hand
Posts: 2166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
o.k. Axel next time you will read api, before asking:
as with Java1.3 there is a new method in JTable called setRowHeight(indexOfRow, heigh_in_pixels);
works.
Now, I have problems to implement JTextArea as CellRenderer to be able to use \n.
Regards Axel
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!