I've changed the default icon for my tree nodes in my JTree by using
DefaultTreeCellRenderer and this works fine.
But what I want to do is change not only the icon, but have some text
that will always display next to the icon and then ...
When I double click on the icon/text, be able to enter a value next to
the icon/text, but not change either the icon or the text, but only the
value I enter.
The text next to the icon must always stay there, but I'd like to enter
a value next to the text.
(icon)(static text) myValue
Is there a way to make like a JLabel as the DefaultTreeCellRenderer
that uses image and text, and if I double click that ... I can enter
the value next to it?
Any help much appreciated.
Vova Reznik - 24 Oct 2005 19:44 GMT
> I've changed the default icon for my tree nodes in my JTree by using
> DefaultTreeCellRenderer and this works fine.
[quoted text clipped - 16 lines]
>
> Any help much appreciated.
I don't understand connection between renderer and editing,
but may you need just
yourTable.setEditable(true);
DefaultTreeCellRenderer is JLabel.