• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

To set tool tip only for the leaf nodes

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Author
Posts: 986
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  •  
    Ranch Hand
    Posts: 4632
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • 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
      Number of slices to send:
      Optional 'thank-you' note:
    • 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.
    reply
      Bookmark Topic Watch Topic
    • New Topic