This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Swing / AWT / SWT and the fly likes Display Directory structure in tree format like windows explorer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Display Directory structure in tree format like windows explorer " Watch "Display Directory structure in tree format like windows explorer " New topic
Author

Display Directory structure in tree format like windows explorer

shashi wagh
Ranch Hand

Joined: Oct 30, 2008
Posts: 38
Hi .........



I want do develop swing component like windows explorer to view the files and folder on the server
Also I want Copy Paste Option for the same
I want to integrate the same in my Web application

Please give me some guideline to start developing such component.
If any existing reference Please give me the link for the same.



Thanks in advance .........
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10268
    
    8

To browse the directory structure one usually uses JFileChooser in Swing.
What technology are you planning to use? You mention "web application"
Do you have an applet in mind?

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
shashi wagh
Ranch Hand

Joined: Oct 30, 2008
Posts: 38
JFileChooser is for selecting file.

But I want to develop User Interface like Explorer tree structure by accessing the file system of the server.

In any thing applet or swing n then integrate to Web Application.
Mikko Kohtamäki
Ranch Hand

Joined: Dec 13, 2008
Posts: 112
for the starters...

How to Use Trees>
shashi wagh
Ranch Hand

Joined: Oct 30, 2008
Posts: 38
Requirement is : In web application, client user wants to access server side directory structure with some user-interface.

How can it be achieved in j2ee platform or will server-side javascript help ?
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10268
    
    8

Did you go through the link Mikko gave you?
To build the tree nodes, you will have to query the server (unless your client has access to all folders on the server, which I doubt)
From the nodes, you build a tree which you can display in an applet which is embedded on some web page.
 
Don't get me started about those stupid light bulbs.
 
subject: Display Directory structure in tree format like windows explorer