Article View: borland.public.jbuilder.java.swing
Article #12515Re: JTree and ToolTips
From: Matt Krevs
Date: Thu, 17 Dec 1998 00:00
Date: Thu, 17 Dec 1998 00:00
32 lines
1858 bytes
1858 bytes
I havent done this myself but I found this message on the advanced swing
forum that may be of interest.
"You can use the following code after creating a tree
ToolTipManager.sharedInstance().registerComponent(myTree);
This will use the text property of each component of the tree as tooltips.
If you want to customize that then
you have to subclass the CellRenderer for the tree and use setToolTipText
method to set text of you choice. Of course to get different text you will
attach a object with each componet of tree which will hold the tooltips I
believe."
Thanks to Dhiman Biswas for the above extract.
Dominique Louis wrote in message <3677447D.35A8B38B@oz.quests.com>...
>Hi JBuilderites,
>
>A Work colleague is using a JTree and the DataBase Grid Bean. When the
>user Clicks on the a Node in the JTree it loads That Node's DataBase
>Values from an oracle Database. As an asthetic enhancement I've asked
>that ToolTips be added to any node item that is obscured by the Splitter
>bar. DataBase Grids seem to do this Once you setDataBaseToolTips
>Property to True. is there an Equivalent Option for the JTree? If Not
>what would be the Best way to achieve this and Is it possible to get the
>Rectangle location of the Node Text ( in order to get the Text and
>display the the Full Tooltip over it ).
>
>Thanks
>
>Dom.
>
Technical Details
Message-ID:
<75a3f4$ru110@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3677447D.35A8B38B@oz.quests.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,bd93cf5ebe1cb6ed X-Google-Attributes: gid111d45,public From: "Matt Krevs" <mattkrevs@flex.com.au> Subject: Re: JTree and ToolTips Date: 1998/12/17 Message-ID: <75a3f4$ru110@forums.borland.com> X-Deja-AN: 423142217 References: <3677447D.35A8B38B@oz.quests.com> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Organization: Another Netscape Collabra Server User Newsgroups: borland.public.jbuilder.java.swing