JTree cell size problem
Hi! ,
I have a JTree displayed within a JScrollPane. The JTree has a custom renderer, whose
GetTreeCellRendererComponent method return different objects (depending on the node).
One of the objects returned is a JEditorPane. When a node of this type is expanded Id like the JEditorPane to be shown at it s preferred size and not be limited to a tree cell size (i.e.- I'd like the cell size to change for this specific node based on the editor's preferred size). The user will have to scroll down the tree in order to view the text or the nodes bellow.
My problem is I am unable to control the size of the tree cell. I manage to show either all of text in one line using only the main horizontal scroll, orin one (very long) column (whos width is the width of the longest text element) using only the vertical scroll. I am unable to change both width & height of the cell! .
Setting the editor s preferred size does not help.
Please note: the trees row height is set to 1.
Any suggestions? .
Thanks! .

