Article View: borland.public.jbuilder.java.swing
Article #13122Re: JTree: how can I make a childless node non-leaf
From: Papadomichelakis John
Date: Fri, 25 Sep 1998 00:00
Date: Fri, 25 Sep 1998 00:00
52 lines
1947 bytes
1947 bytes
This is a multi-part message in MIME format. --------------2175046968F8FADC6AFDF9AC Content-Type: text/plain; charset=iso-8859-7 Content-Transfer-Encoding: 7bit Frode Oldervoll wrote: > I want to make a childless node in a JTree a non-leaf, because I want to add > leafs to the node at runtime. How can I do this? I have tried to use > setAllowsChildren(true), but the childless nodes still becomes leaf nodes. I thing that there is a isLeaf method that specifies if the node has children or not. You can simply override that method and return always true. -- Papadomichelakis John "Unite for Java! - http://www.javalobby.org" __________________________________________________ email : michelos@freemail.gr TEL : 30 31 758 429, 30 31 709 796 __________________________________________________ --------------2175046968F8FADC6AFDF9AC Content-Type: text/x-vcard; charset=iso-8859-7; name="michelos.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Papadomichelakis John Content-Disposition: attachment; filename="michelos.vcf" begin:vcard n:Papadomichelakis;John x-mozilla-html:TRUE org:BIA adr:;;;Thessaloniki;;56224;Hellas version:2.1 email;internet:michelos@freemail.gr x-mozilla-cpt:;0 tel;home:758 429 tel;work:267 923 fn:John Papadomichelakis end:vcard --------------2175046968F8FADC6AFDF9AC--
Technical Details
Message-ID:
<360AC206.C6B28614@freemail.gr>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<6tlprd$rv12@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,e9d41362ca1830e1 X-Google-Attributes: gid111d45,public From: Papadomichelakis John <michelos@freemail.gr> Subject: Re: JTree: how can I make a childless node non-leaf Date: 1998/09/25 Message-ID: <360AC206.C6B28614@freemail.gr> X-Deja-AN: 394524144 References: <6tlprd$rv12@forums.borland.com> X-Accept-Language: el Content-Type: multipart/mixed; boundary="------------2175046968F8FADC6AFDF9AC" Organization: BIA Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing