-
need to add icon for each node in JTree ????
hi,
I need to add icon for each node in JTree,
Please H E L P . . .
-
Re: need to add icon for each node in JTree ????
By default JTree will give you one icon for each node. You can override that
behaviour by writing your own DefaultTreeCellRenderer for displaying different
icons for node. If you want to give the default icons of your own you can
call the following methods.
UIManager.put("Tree.expandedIcon",
new ImageIcon("images/tree_open.gif"));
UIManager.put("Tree.collapsedIcon",
new ImageIcon("images/tree_closed.gif"));
"Guy" <guy__b@hotmail.com> wrote:
>
>hi,
>I need to add icon for each node in JTree,
>Please H E L P . . .
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks