aspose file tools
The moose likes Swing / AWT / SWT / JFace and the fly likes JFileChooser.DIRECTORIES_ONLY Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT / JFace
Reply Bookmark "JFileChooser.DIRECTORIES_ONLY" Watch "JFileChooser.DIRECTORIES_ONLY" New topic
Author

JFileChooser.DIRECTORIES_ONLY

Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

What I want to do:
have the user choose a Directory to which I am going to write a file(pre-named). This is how I am currently doing it:

the above code just does nothing when the "select Target Directory" button is pressed. If CANCEL is chosen then it does exit properly. Another funny thing is that if comment out
//jfc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); then the code works fine???
Any suggestions would be appreciated as to why the above may not be working... or if there is a better way to accomplish my goal.
Jamie
 
 
subject: JFileChooser.DIRECTORIES_ONLY
 
Threads others viewed
file dialog
Select directory with JFileChooser
JFileChooser issue - opens at the back of the browser
JFileChooser problem
JFileChooser : User selected directory & programmatically created file name : How?
developer file tools