JTree with filestructure from a database

Discussion in 'Java' started by SlimClity, May 20, 2004.

  1. SlimClity

    SlimClity Guest

    Hi,

    I'm trying to create a JTree with filestructure from a database.

    Database layout:
    dirname_client: filename_client:

    D:/testmap file1.pl
    D:/testmap file2.txt
    D:/testmap file3.txt
    D:/testmap/testscripts file1.pl
    D:/testmap/testscripts file2.txt
    D:/testmap/testscripts/map1 file4.txt
    D:/testmap/testscripts/map1/ab file5.txt


    I can create a tree with files and folders, but the directory is 3x in
    the database (like testmap) JTree shows it 3x:

    Root
    -testmap
    --file1.pl
    -testmap
    --file2.txt
    -testmap
    --file3.txt

    This is not what I want, It must list the directory only once:

    Root
    -testmap
    --file1.pl
    --file2.txt
    --file3.txt
    --testscripts
    ---file1.pl
    ---file2.txt

    How can I solve this problem? Maybe some expamples?

    Greetings,

    Slimclity
    SlimClity, May 20, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Christophe Boutin

    double click in a jtree

    Christophe Boutin, Jul 24, 2003, in forum: Java
    Replies:
    1
    Views:
    13,067
    catalysoft.com
    Jul 25, 2003
  2. Pavel
    Replies:
    1
    Views:
    3,131
    Pavel
    Jul 25, 2003
  3. Abraham Khalil
    Replies:
    0
    Views:
    4,730
    Abraham Khalil
    Sep 17, 2003
  4. Johnny
    Replies:
    0
    Views:
    884
    Johnny
    Oct 2, 2003
  5. jumpz
    Replies:
    3
    Views:
    615
    Jean-Baptiste Nizet
    Nov 12, 2007
Loading...

Share This Page