• Post Reply Bookmark Topic Watch Topic
  • New Topic

JTree and JDBC - Swing Component

 
preeth
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
I wrote a program to access records from the database and display records in a tree structure.I was able to do only up to one level.Even though the code works fine the higher level retrieves only one record but the sub level for the first record higher level retrieves all records.The same code works fine if I hard code the tree names instead os names retrieved from the resultset.Some how the while loop brace is creating this problem.Could anybody suggest me a method of doing this.
my code :


[This message has been edited by Jim Yingst (edited August 29, 2000).]
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, I don't really have time to look into this right now - but see how much more readable the code is when you put [ code ] and [ /code ] tags around it (without the spaces). Read more about these tags here.
 
Craig Snowbarger
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by preeth:
[B]Hi ,
I wrote a program to access records from the database and display records in a tree structure.I was able to do only up to one level.Even though the code works fine the higher level retrieves only one record but the sub level for the first record higher level retrieves all records.The same code works fine if I hard code the tree names instead os names retrieved from the resultset.Some how the while loop brace is creating this problem.Could anybody suggest me a method of doing this.
my code :

[This message has been edited by Jim Yingst (edited August 29, 2000).][/B]

Are you still needing help with this? If so, I have a solution. Let me know.
 
William Dyson
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am also looking at an app that could benefit from this approach. Do you have the solution to the problem described below?
Originally posted by Craig Snowbarger:
[B]
[This message has been edited by Jim Yingst (edited August 29, 2000).][/B]

Are you still needing help with this? If so, I have a solution. Let me know.[/B]
</BLOCKQUOTE>
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!