Help about TreeNode display text.

I have created a tree structure using javax.swing.Tree.

User can edit display text of a TreeNode.

Scenario:

I edited a TreeNode and changed its display text. (Display text was entered in a pop up input box). Say, I have entered "FirstNode" as new display text. Now, sometimes, it would be displayed as "Fir...". When I click to expand this node, it again shows complete display text i.e. "FirstNode".

I want to show complete display text always. I mean instead of showing "Firs..." I need it to show "FirstNode" always.

How can I do that?

thanks in anticipation

Nasir

[618 byte] By [Nasir-SystemsLtda] at [2007-10-3 5:24:33]
# 1
hai Nasir can u try with this one.plz set the width of text label1.setText(text);Dimension d = getPreferredSize(); int textWidth = label1.getPreferredSize().width; d.width = textWidth;setPreferredSize(d);
BaluKa at 2007-7-14 23:31:42 > top of Java-index,Desktop,Core GUI APIs...