Set for specific nodes in JTree specific rowheight

Hi,

I got a JTree with different components for the nodes userobject.

some nodes got JTextAreas as userobject. Those nodes got the same height as all other nodes. This is the problem ... the nodes who contains JTextAreas should have a larger rowheight - to paint their content well. But there is only a method to specify the of the height of all rows in a JTree, anyone knows a good solution?

thx

null

Message was edited by:

Olek

[473 byte] By [Oleka] at [2007-11-27 4:56:09]
# 1

From the JTree.setRowHeight [url=http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/JTree.html#setRowHeight(int)]documentation[/url]:

"Sets the height of each cell, in pixels. If the specified value is less than or equal to zero the current cell renderer is queried for each row's height."

So try tree.setRowHeight(0);

Torgila at 2007-7-12 10:11:16 > top of Java-index,Desktop,Core GUI APIs...
# 2
Thx that works good.
Oleka at 2007-7-12 10:11:16 > top of Java-index,Desktop,Core GUI APIs...