Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic


Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic