🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Adding nodes to JTree

#13241
From: ssridhar
Date: Mon, 24 Aug 1998 00:00
23 lines
1618 bytes
Hi all,
   I have some problems with displaying the nodes that are added to the tree
for the first time. When I double click on any node, I query the database and
depending on the no. or rows got I just add the nodes to the tree.

I'm using treemodel.insertNodeInto method for this. But the first time the
app is loaded and I double-click on a node, It gets the proper data from the
database, adds the nodes but they won't show up. I'm currently doing an
expand of that node explicitly. This expansion is not desirable b'cos when
I double-click again on that node I want it to collapse, which wont happen
in my case b'cos I have given an Explicity expand row.

But strangely enough, when my tree is expanded and when I add a new node
to the existing node or update it (for which I'm using the same
IsnertNodeInto method), things work fine.

Its just the first time when I double-click on the root node , the children
won't show up.

Any help is appreciated

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum
Technical Details
Message-ID: <6rsee7$gk1$1@nnrp1.dejanews.com>
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,db769de437c8b209,start
X-Google-Attributes: gid111d45,public
From: ssridhar@salesvision.com
Subject: Adding nodes to JTree
Date: 1998/08/24
Message-ID: <6rsee7$gk1$1@nnrp1.dejanews.com>
X-Deja-AN: 384273305
Organization: Deja News - The Leader in Internet Discussion
X-Article-Creation-Date: Mon Aug 24 19:20:40 1998 GMT
Newsgroups: borland.public.jbuilder.java.swing
X-Http-User-Agent: Mozilla/4.05 [en] (WinNT; I)