Article View: borland.public.jbuilder.java.language
Article #454Icons with JTree
From: Magnus
Date: Wed, 06 Apr 2005 14:04
Date: Wed, 06 Apr 2005 14:04
17 lines
1667 bytes
1667 bytes
Hello, I have read two good tutorials on how to use JTree and both contain how to change the icons for open, close and leaf. Now I would like to do the following: 1) Different icons for the leaf depending on what "type" the leaf represents. (i.e. in one example with books i want a different icon if the book (leaf) is in a specific language). 2) This would then "carry" over to the node node so if the node has a leaf with all books in one language to show that with a specific icon (i.e. if it is only English books under that node to show a "flag-icon") and if it is a mix of languages (i.e. a "?-icon") I have the information in a SQL-DB and will read and build a tree-data structure before building the JTree. Thanks in advance
Technical Details
Message-ID:
<4253ec5e$2@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!npeer.de.kpn-eurorings.net!feed.news.schlund.de!schlund.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: f74b3,3caa501e63d3c120,start X-Google-Attributes: gidf74b3,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Wed, 06 Apr 2005 10:04:10 -0400 From: Magnus <magnus_bjorkman@iwon.com> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax) X-Accept-Language: en-us, en, sv MIME-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language Subject: Icons with JTree Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 67.76.183.231 Message-ID: <4253ec5e$2@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1112796254 67.76.183.231 (6 Apr 2005 07:04:14 -0800) Lines: 17 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!npeer.de.kpn-eurorings.net!feed.news.schlund.de!schlund.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail