aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes check out the create New Folder button in JFileChooser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "check out the create New Folder button in JFileChooser" Watch "check out the create New Folder button in JFileChooser" New topic
Author

check out the create New Folder button in JFileChooser

Alan Shiers
Ranch Hand

Joined: Sep 24, 2003
Posts: 237
Hi Guys,

I'm working with JFileChooser in my project. Ever notice that when you're at a root directory or simply at the root of your drive, the Create New Folder button is disabled? That doesn't seem right! Seems to me that button should be enabled so you can create a new folder. Is there a way to ensure it remains enabled at a root directory? I'm using a class that extends FileSystemView which I pass onto the constructor of JFileChooser. This class limits access to the hard drive by creating a root directory for the program. Naturally, I would want the user to create new folders within the root directory, but JFileChooser isn't letting me do that.

Alan
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
seems to work OK for me (vista, java 1.6.something)

perhaps a platform/version issue?
Alan Shiers
Ranch Hand

Joined: Sep 24, 2003
Posts: 237
Maybe it is...my OS is Windows7, java 1.6 something also. Anybody else come across this issue?

Alan
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4529
    
    5

To get better help sooner, post a SSCCE (Short, Self Contained, Compilable and Executable) example that demonstrates the problem.


luck, db
There are no new questions, but there may be new answers.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: check out the create New Folder button in JFileChooser