Re: Removing "All Files" option from FileType of JFileChooser



"Srik" <srikanth.a.r@xxxxxxxxx> 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
.



Relevant Pages

  • Re: getOpenFile etc. wish-list
    ... Eckhard Lehmann wrote: ... containing lots of image files of different types: ... option for each of the various file suffixes, ... select one of those types to help them filter the list of files. ...
    (comp.lang.tcl)
  • Re: Removing "All Files" option from FileType of JFileChooser
    ... 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 ... Even i am facing this problem. ...
    (comp.lang.java.gui)
  • SUGGESTIONS? Reusing Express VI configuration panel in interactive applications
    ... I have an interactive program with a graphical user interface in which ... interface that would allow user to modify the filter properties. ... Pressing this button would pop up a configuration window, ... The problem is that I need to code the same or similar user interface ...
    (comp.lang.labview)
  • Re: GFS2: Add LED support to GFS2
    ... so selecting the trigger acts as a filter on the event type. ... So I guess what I'm really getting at, is what would the user interface ... I did consider adding a feature to filter events on a per superblock ...
    (Linux-Kernel)
  • Re: View of Doc Library as Web Part
    ... > But note that if I remember right you can neither sort nor Filter (Filter in ... > the user interface not filter in a View) on multi-choice fields. ...
    (microsoft.public.sharepoint.windowsservices)