• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

To set tool tip only for the leaf nodes

 
Archana Venu Aradhyula
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all

I use a JTee where the elements are loaded dynamically. I want to set the tool tip only for the leaf elements. But it is setting to the entire tree.


How can i achieve this?

Thanks
Archana
 
Brian Cole
Author
Ranch Hand
Posts: 908
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Archana Venu Aradhyula:
I use a JTee where the elements are loaded dynamically. I want to set the tool tip only for the leaf elements. But it is setting to the entire tree.



It's hard to say without knowing more details, but two things to try are

  • call setToolTipText(null) even when !(value instanceof VPDTreeViewerNode)
  • set the tool tip on component, not on this
  •  
    Michael Dunn
    Ranch Hand
    Posts: 4632
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    > I want to set the tool tip only for the leaf elements.

    seems to work OK like this

     
    Archana Venu Aradhyula
    Greenhorn
    Posts: 13
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    But still it is not working. It is considering the tooltip that i set at the last that is null.
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic