🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #9122

Adding Nodes to JTree

#9122
From: Jack Cook
Date: Fri, 26 May 2000 00:00
26 lines
1059 bytes
All,

I have a JTree in which I am programatically adding DefaultMutableTreeNode
subclasses too.
For example

A
+---B
      |
      +--C
      |
      +--D

C and D or children of B. When I click on B I popup a file selection dialog
and select a file (C).
I add C as a child of B and then do a JTree.expandPath(). If I then try to
click on B and add
another file (D) it appears to work however D never shows up in the tree. I
did notice that if
I never do an expandPath() I can get mutliple children (C&D).

Any clues as to what my problem might be?

Thanks,

Jack
Technical Details
Message-ID: <392ec497@dnews>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,7e7acf512106fddf,start
X-Google-Attributes: gid111d45,public
From: "Jack Cook" <jcook@shellus.com>
Subject: Adding Nodes to JTree
Date: 2000/05/26
Message-ID: <392ec497@dnews>
X-Deja-AN: 627695832
X-Trace: 26 May 2000 11:38:15 -0800, 127.0.0.1
Organization: Shell Services International
Newsgroups: borland.public.jbuilder.java.swing
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3612.1700