Skip to main content

Tree does not update when TreeCellRenderer changes cell size

1 reply [Last post]
Joined: 2003-06-17

According to this is not a bug and will not be fixed.
Using 1.4.x (even 1.4.2) I still get the error were my labels gets draw with ... fx. I have a text "abcdefg" that gets drawn as "abcd..."
I have tried all of the recommended ways to fix this, but none of them helps.
Its as joneshJ writes in the bug report as if there are several threads involved.

What can I do to make the ... go away?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2003-08-07

I had a similar problem before, which is, if I initialize a TreeNode with "abcd" and later change the text to "abcdefg", it becomes "abcd...". I was lucky to stumble upon a solution to make the dots go away:

public void setText (String text){
setUserObject (text);
if (tree != null)
tree.treeModel.nodeChanged (this);

This is a method in my TreeNode class. The nodeChanged method makes the dots go away.

Hope this is helpful.