Re: how to get renderer component from currently selected node



NullBock schrieb:

Which means that setting the renderer's tool tip text is going to give
you unpredictable results, at best.  What you need to do, rather, is

Wrong. JTree overrides JComponent#getToolTipText(MouseEvent) in order to make use of the renderer's tool tip text.


Setting the tool tip of the renderer component gives pretty predictable results - at least as long as it's done in the getTreeCellRendererComponent method.

Bye
Michael
.