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 Beginning Java and the fly likes Getting the 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 » Beginning Java
Bookmark "Getting the "Tree View" Dialog Box" Watch "Getting the "Tree View" Dialog Box" New topic
Author

Getting the "Tree View" Dialog Box

Darren Alexandria
Ranch Hand

Joined: Aug 17, 2007
Posts: 185
Good day!

May I ask what do you call the "Dialog Box" that pops up if you click a button say, "Browse" which shows all the files in the file System and then you select a folder, click OK and all of its contents will be retrieved? Its like in WinAmp music player where you want to add file/folders then you click a button, a dialog box will appear, then you select a folder, click OK and then the contents of that folder will be retrieved.

Sorry, I find it hard to explain this concept.


Thanks.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19677
    
  18

It's called a File Dialog.

In Java there are two classes that will already do what you need: JFileChooser in Swing and FileDialog in AWT.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Darren Alexandria
Ranch Hand

Joined: Aug 17, 2007
Posts: 185
Thanks so much for the information.

Another question would be, can I use it in Struts? I need to implement it on Struts.

Thanks again.

Darren
[ September 11, 2007: Message edited by: Darren Alexandria ]
 
 
subject: Getting the "Tree View" Dialog Box