how to get renderer component from currently selected node
- From: "William Z." <Wizumwalt@xxxxxxxxx>
- Date: 28 Nov 2005 14:29:21 -0800
I have extended a DefaultTreeCellRenderer class so that I can have
JComboBoxes and editable fields in my JTree's nodes. My problem is that
I'd like to dynamically update the tooltips for each tree node to
display different information and I'm not sure how this is done.
Currently I just call setToolTipText() from within my
getTreeCellRendererComponent(...) method.
But I'd really like to make setToolTipText() calls from within the
valueChanged(TreeSelectionEvent tse) of my class which is extended from
TreeSelectionListener(). I think maybe I just don't know how to get the
treecellrenderer component from the currently selected node so that I
can call setToolTipText() on it.
Any ideas, help much appreciated.
.
- Prev by Date: Re: JPopupMenu position changing
- Next by Date: automatically not manually
- Previous by thread: Strange behaviour of JTabbedPane
- Next by thread: Re: how to get renderer component from currently selected node
- Index(es):