Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / October 2005

Tip: Looking for answers? Try searching our database.

JLabel inside DefaultTreeCellRenderer?

Thread view: 
William Z. - 24 Oct 2005 19:34 GMT
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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.