• 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

Dynamically increasing row height in JTable

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey guys,
i am trying to set row height for each row individually. I created a JTextArea renderer, (because i need to show multiple lines inside some cells). TextArea knows how many lines should be there, so i set the row height in the getTableCellRendererComponent() method of Renderer based on the preferred of the textArea. I call table.setRowHeight(rowNumber, height_wanted)
where height_wanted is a preferred size of TextArea. It doesn't work. I found one article that mentioned that it doesn't work for 1.4 and works for 1.3 but i wasn't sure if it was fixed yet, or not. I use 1.4_0_1 (the latest available)
Anyone with similar experience??
thanks a lot.
 
polina_keselman
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok, it actually works for a regular JTable.. guess the problem is in the table that i use :-(
 
I found some pretty shells, some sea glass and this lovely tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic