JTree with filestructure from a database

S

SlimClity

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top