Matthias K�mpel wrote:
> hello,
> 
> im using a custom TreeCellRender that extends the
> javax.swing.tree.DefaultTreeCellRenderer.
> 
> My getTreeCellRendererComponent( ... ) method looks like:
> 
> super.getTreeCellRendererComponent( ... );
> ...
> setToolTipText( "Test" );
> ...
> return this;
> 

JTree does not show tooltips by default (I think for speed reasons). 
Therefore you have to activate it by yourself:
<code>
ToolTipManager.sharedInstance().registerComponent(yourTree);
</code>

For more convenience you may ask the node for the tooltip (i.e. the 
parameter value is your current node. Doing so the node itself could 
give you the right title).

> 
> But the ToolTipText isnt displayed on any node ... what am i doing wrong
> ?
> 
> 
> Thanx in advance,
> Matthias K�mpel
> 
> P.S.: All other modifacations i make in my custom renderer like icons,
> color, etc. are displayed correct.
> 
> _______________________________________________
> Swing mailing list
> [EMAIL PROTECTED]
> http://eos.dk/mailman/listinfo/swing
> 
> 

Best regards,
        Stefan

_______________________________________________
Swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/swing

Reply via email to