Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Correctly implementing save with JFileChooser

 
Chris Waguespack
Ranch Hand
Posts: 36
Eclipse IDE Flex Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm currently using JFileChooser to save a file from my application, and would like to make sure the file name the user is giving does not already exist and does not contain any OS-disallowed filename characters. So far I have


The problem with this code, is that it does not check for bad filename characters (which I can't figure out how to do) and that if the file exists already, it won't take you back to the JFileChooser to correct it (like it will in most other applications ex. Notepad).
Any ideas?

Thanks a bunch,
Chris
[ May 16, 2008: Message edited by: Chris Waguespack ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic