aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes browse folder(complete) in java swings Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "browse folder(complete) in java swings" Watch "browse folder(complete) in java swings" New topic
Author

browse folder(complete) in java swings

Rishabh Rathi
Greenhorn

Joined: Mar 07, 2011
Posts: 13
Hello Everbody.


I am new to this forum and also new to JAVA.
I am working on a project using which a folder can be compressed and decompressed.
But the very first problem i get is i am not able to browse complete folder.
Please help me out.
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2090
    
    7
I guess you are looking for the File.list(...) method.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 9990
    
    7

Swings!=Swing
SwingIsAProperNoun

...and Welcome to the Ranch


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19541
    
  16

Rob Camick wrote:I guess you are looking for the File.list(...) method.

And otherwise for JFileChooser.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Rishabh Rathi
Greenhorn

Joined: Mar 07, 2011
Posts: 13
Thank you all 4 for your reply.....but i still not get my answer as i want to know how to browse for complete folder rather than single file....


JFileChooser() is for choosing a file not a folder
Rishabh Rathi
Greenhorn

Joined: Mar 07, 2011
Posts: 13

@Rob:

Will you please give an example of code so that i can get it more easily?
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19541
    
  16

Rishabh Rathi wrote:Thank you all 4 for your reply.....

Sorry to nitpick, but UseRealWords: "for", not "4".

JFileChooser() is for choosing a file not a folder

Not if you set the file selection mode to JFileChooser.DIRECTORIES_ONLY or JFileChooser.FILES_AND_DIRECTORIES; the default is JFileChooser.FILES_ONLY.

Rishabh Rathi wrote:
@Rob:

Will you please give an example of code so that i can get it more easily?

If you click on the JFileChooser words around this thread you will open up its Javadoc page. At the top there's a link with label "How to Use File Choosers". Click on it and read the page you're redirected to.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: browse folder(complete) in java swings
 
Similar Threads
Opening a "Browse" window by Java Script
WebPage to Applet to WebPage to Java
Browse point to specific folder
Browse and select folders
please help me