Path: csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news-out.readnews.com!transit3.readnews.com!news-out.news.tds.net!newsreading01.news.tds.net!86597e80!not-for-mail From: "tar" Subject: Re: Removing "All Files" Message-ID: X-Comment-To: comp.lang.java.gui Newsgroups: comp.lang.java.gui In-Reply-To: <1172222937.481929.198410@s48g2000cws.googlegroups.com> References: <1172222937.481929.198410@s48g2000cws.googlegroups.com> Content-Type: text/plain; charset=IBM437 Content-Transfer-Encoding: 8bit X-Gateway: time.synchro.net [Synchronet 3.15a-Win32 NewsLink 1.92] Lines: 39 Date: Wed, 27 Apr 2011 15:30:54 GMT NNTP-Posting-Host: 96.60.20.240 X-Complaints-To: news@tds.net X-Trace: newsreading01.news.tds.net 1303918254 96.60.20.240 (Wed, 27 Apr 2011 10:30:54 CDT) NNTP-Posting-Date: Wed, 27 Apr 2011 10:30:54 CDT Organization: TDS.net Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.gui:1015 To: comp.lang.java.gui "Srik" writes: > I think the question here is When we apply a filter to the > JFileChooser, say to select image files, when we do open dialog ,we > can see the filter - image files as well as "All files". All files > would come all the time. If "All files" is also displayed then there > is no point in applying the filter, since the user can very well > select "All files" all the time. Even i am facing this problem. Any > help?? Why is this a problem? Having the extra flexibility is a benefit to the user interface, because you can end up in situations where files happen not to be named correctly. That is why you shouldn't remove the "All Files" filter option. I think it is a mistake to assume that you have complete control of the environment in which your application can run, or that the software is smarter than the user. By all means, add the image file filter and use that as the default setting, but leave the option to select all files in as well. You will have a more robust user interface, and your users will be thankful. I don't really see any advantage to disabling the all files option, since you would still need to handle mal-formed or mis-named files when you try to load image files anyway. So if you are worried about someone deliberately changing the filter and choosing a non-image file, you would already have the code in place to trap the problem and complain. You need that code anyway, so it isn't any more work to make the interface flexible. -- Thomas A. Russ, USC/Information Sciences Institute --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24