This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I have a jtree in which I pre-select a node. On selecting, I add some text to the node. I have MyTreeCellRenderer which extends DefaultTreeCellRenderer class. I use setText() to paint the tree node. But, when the new text is added, it is not visible. It shows like <b>100 ...</b> instead <b>100 ABC</b> But, when I expand the node, the new text is shown properly. Any ideas why is this happening? I think the jtree is not repainting.