File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes JFileChooser Question 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 "JFileChooser Question" Watch "JFileChooser Question" New topic
Author

JFileChooser Question

D R Wilkinson
Ranch Hand

Joined: Oct 29, 2004
Posts: 51
When I create a JFileChooser to save files with, the "Create New Folder" button is always disabled.

How do I enable this button?

Also, why is this button enabled on the open file version? I don't understand why a user would want to create a new folder in order to open an existing file as that file must be stored within a folder... or am I missing something.

Thanks.

Darren
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39541
    
  27
Check out the setFileSelectionMode method; it does what you're looking for.


Ping & DNS - updated with new look and Ping home screen widget
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JFileChooser Question
 
Similar Threads
Problem with JFileChooser Create New Folder when Program Files folder is selected.
JFileChooser problem
How to import Image file
In JFileDialog how to use the save window
Disabling and Enabling Up One level button and new folder button in JFileChooser on some condition