Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #1010 > unrolled thread

Removing "All Files" opti

Started by"urpriya" <urpriya@THRWHITE.remove-dii-this>
First post2011-04-27 15:30 +0000
Last post2011-04-27 15:30 +0000
Articles 5 — 4 participants

Back to article view | Back to comp.lang.java.gui


Contents

  Removing "All Files" opti "urpriya" <urpriya@THRWHITE.remove-dii-this> - 2011-04-27 15:30 +0000
    Re: Removing "All Files" "Srik" <srik@THRWHITE.remove-dii-this> - 2011-04-27 15:30 +0000
      Re: Removing "All Files" "tar" <tar@THRWHITE.remove-dii-this> - 2011-04-27 15:30 +0000
    Re: Removing "All Files" "Michael Dunn" <michael.dunn@THRWHITE.remove-dii-this> - 2011-04-27 15:30 +0000
      Re: Removing "All Files" "Srik" <srik@THRWHITE.remove-dii-this> - 2011-04-27 15:30 +0000

#1010 — Removing "All Files" opti

From"urpriya" <urpriya@THRWHITE.remove-dii-this>
Date2011-04-27 15:30 +0000
SubjectRemoving "All Files" opti
Message-ID<1172211721.405427.227370@t69g2000cwt.googlegroups.com>
  To: comp.lang.java.gui
How to remove "All Files" option from JFileChooser? OR How can i
diable the selection of file type of All FIles?

I want to select only image files form the JFileChooser. How can i
implement this feature?

---
 * 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

[toc] | [next] | [standalone]


#1011 — Re: Removing "All Files"

From"Srik" <srik@THRWHITE.remove-dii-this>
Date2011-04-27 15:30 +0000
SubjectRe: Removing "All Files"
Message-ID<1172222937.481929.198410@s48g2000cws.googlegroups.com>
In reply to#1010
  To: comp.lang.java.gui
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??

---
 * 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

[toc] | [prev] | [next] | [standalone]


#1015 — Re: Removing "All Files"

From"tar" <tar@THRWHITE.remove-dii-this>
Date2011-04-27 15:30 +0000
SubjectRe: Removing "All Files"
Message-ID<ymi1wkg94e9.fsf@sevak.isi.edu>
In reply to#1011
  To: comp.lang.java.gui
"Srik" <srikanth.a.r@gmail.com> 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

[toc] | [prev] | [next] | [standalone]


#1012 — Re: Removing "All Files"

From"Michael Dunn" <michael.dunn@THRWHITE.remove-dii-this>
Date2011-04-27 15:30 +0000
SubjectRe: Removing "All Files"
Message-ID<45deb49a@dnews.tpgi.com.au>
In reply to#1010
  To: comp.lang.java.gui
<urpriya@gmail.com> wrote in message news:1172211721.405427.227370@t69g2000cwt.googlegroups.com...

> How to remove "All Files" option from JFileChooser?



fileChooser.setAcceptAllFileFilterUsed(false);

---
 * 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

[toc] | [prev] | [next] | [standalone]


#1013 — Re: Removing "All Files"

From"Srik" <srik@THRWHITE.remove-dii-this>
Date2011-04-27 15:30 +0000
SubjectRe: Removing "All Files"
Message-ID<1172226237.405344.220710@j27g2000cwj.googlegroups.com>
In reply to#1012
  To: comp.lang.java.gui
Thanks a lot!

---
 * 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

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.gui


csiph-web