• Post Reply Bookmark Topic Watch Topic
  • New Topic

ToolTipText for JLabel with in a Box (renderer for JTree Node)  RSS feed

 
Ravi Sathish
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Java Ranchers,

I have a Tree with a CustomRenderer say NodeRender

NodeRenderer is a Box (NodeBox) with 3 JLabels and a JProgressBar.

In my getTreeCellRendererComponent() I'm registering the tree with ToolTipManager:


I'm able to set toolTipText for the NodeBox (i.e. Box component) and it works alright.


However I'm not able to set toolTipText for individual labels inside my Box. I tried the following:

1> registering these labels directly with ToolTipManager

2> setting toolTipText() directly for e.g. nodeRenderer.NodeBox.label1.setToolTipText(someToolTipText);

3> Tried to access the component from the Box


Nothing seems to help. Would appreciate any feedback, pointers

Regards,
Ravi
 
Craig Wood
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Ravi Sathish
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Craig,

You sure are the savior of Swings Forum

Ravi
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!