Meaningless Drivel is fun!*
The moose likes Beginning Java and the fly likes directory tree structures Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "directory tree structures" Watch "directory tree structures" New topic
Author

directory tree structures

kevin schmidt
Ranch Hand

Joined: Aug 24, 2001
Posts: 85
Hi,
I wasn't sure where to post this question, but it is a Java question. How does a person build a directory tree listing. I mean, if you have the program in a directory, it reads everything in that directory and also within every sub-directory contained within, and displayed on the screen. Does anyone know where I could find code to do this, and NO, this is NOT a homework assignment. I know how to display a directory, it's just calling the sub-directorys from within. TIA.
Kevin
I forgot to add one thing. I want it to be a java program, not an applet or servlet. TIA again!!
[This message has been edited by kevin schmidt (edited November 07, 2001).]
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

javax.swing.JTree - Look at that API. Also, look at the SWING tutorial on java.sun.com - It will show code examples.
That should give you a good place to start.

------------------
Happy Coding,
Gregg Bolinger


GenRocket - Experts at Building Test Data
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: directory tree structures