473,396 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Regarding JTree

Hi,

I am presently trying to display an XML document as a tree structure.
I am able to do it using JTree and SAX Parser.

Now I would like to get the parents of all non-leaf nodes and display them as sub-trees.

Does we have any function in JTree where I can retrieve the parents of non-leaf nodes and display them??

Please help.

Thanks!!
Oct 23 '07 #1
1 2408
JosAH
11,448 Expert 8TB
Does we have any function in JTree where I can retrieve the parents of non-leaf nodes and display them??
Have a look at the Java API documentation for the JTree class and see for yourself
that no such method exists. That doesn't forbid you to craft your own method for
that purpose though.

kind regards,

Jos
Oct 24 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Mitch Williams | last post by:
I've been working with a JTree based on a custom TreeModel. Unfortunatly, I cant figure out how to force it to update the entire tree-- there simply dosnt seem to be a way to say "OK, your data...
1
by: Bernard Koninckx | last post by:
Hello everybody, I'vee a small problem with a JTree. I make an expand from a node. And after this operation the selection is lost. How can I do reselect the node than I come expand ? Thanks...
2
by: Piet | last post by:
Hi there, I have managed to write a small java program that display an xml file in a JTree. This was achieved by defining a suitable tree model. THe program works...somehow. The nodes (elements...
0
by: Lucia | last post by:
hello, I habe a Java Program that displays the XML document in a Java JTree using DOM. Now I can add, delete and edit the JTree Elements. But I don't know how to show the attributes also in the...
0
by: luvping04 | last post by:
Hey, i told to make a java program to load xml into JTREE using SAX api. i'm suppose to load the 1st layer of the jtree and hide the subtree into memory. How can i load the subtree into...
0
by: flavourofbru | last post by:
Hi, I am converting a given html document into a tree structure and displaying it using JTree and DefaultMutable classes. By using the html parser and the JTree functionality, I can display the...
2
by: msali36 | last post by:
Hi, i just want to know how can i display the parent- child information in hirarchy tree format in vb.net. for example : GrantParent parent ...
2
by: ace84 | last post by:
Hi, I am creating an application where I want to show a file system. I have never worked with them before, so i am not sure on what I need to do to accomplish my goal. So far I found a script through...
1
by: sivakrish85 | last post by:
Hi, this is krishna i am on developing FTP in java.Here i display the server Files and client Files in tree view using JTree.So my question is that once the client send the file to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.