• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

possible to set different heights for rows in a JTable?

 
Ranch Hand
Posts: 2166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic