File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes Problem with file chooser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Problem with file chooser" Watch "Problem with file chooser" New topic

Problem with file chooser

Trushant Patil

Joined: Apr 13, 2006
Posts: 7
I am using a jfilechooser for saving a file..i have 3 file filters..the problem occurs when i use a wild characters in the file name ( * / ? < | > : \\ " )....i display a error when the filename contains any of the wild characters.....but in case the name contains '*' or '?' the name entered in the fileName field gets added to the file type(filefilters combobox) instead of displaying error ....How can i avoid this. ie stop searching when characters entered contain '*' or '?'
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
Strange behaviour of JFileChooser
Trushant Patil

Joined: Apr 13, 2006
Posts: 7
Thanks Craig.... the link was quite helpful
I agree. Here's the link:
subject: Problem with file chooser
It's not a secret anymore!