• Post Reply Bookmark Topic Watch Topic
  • New Topic

creating a tree-like structure and its functions  RSS feed

 
shalini gnana
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to create a tree on my own i.e., without using jtree class in japplet.Can anyone give any hint for creating...How to create the realationship between the drawings i.e., parent child relationship..Should i have to use any data structure concepts
 
shalini gnana
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to set parent and child relationship..Just give me a outline...Please help me...
[ December 04, 2007: Message edited by: shalini gnana ]
 
shalini gnana
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
NO HELP?
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you told us what the reason for not wanting to use JTree is, we might be better able to help. Are you struggling with how to create a tree-like data structure, or with how to present it in the GUI? What ideas have you had so far?
 
shalini gnana
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I 'll get the datas from xml that which should have to placed under parent and child..I'll use rectangles instead of icon..Now,i face problem while taking it to GUI. i want to set parent&child relationship in my applet only then i can perform parent-child relationship.Here where i'm struck up..Can you please help me...
 
shalini gnana
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any help,please...
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'll ask again:
What ideas have you had so far?


You will need a data structure (read: class) that can handle parent/child relationships, let's call it Node. Each Node object can point to one parent node, and to a number of child nodes. How would you implement such a class?
 
shalini gnana
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'll get those details from xml...

like,
...
....
<Root>
<resc_id ="101" />
<Precceder="201" />
<Sucessor ="102" />
<resc_id ="100" />
<! Root node so no precceder-->
<Precceder =" " />
<successor ="" />
</Root>

I'm not getting any clue,how to get the same relation while placing this in JApplet as Tree(Not using Tree classes...)

Is it possible?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!