> > Accept all file filter is default for JFileChooser. I want to remove
> > it. How to do it?
>
> You don't. You replace it.
>>> Accept all file filter is default for JFileChooser. I want to remove
>>> it. How to do it?
[quoted text clipped - 18 lines]
>
> Is there some other method, I missed?
If you must, and are on 1.3 or better, setAcceptAllFileFilterUsed(false).
But every user who wants to damn-well see the "all" list will curse you
for doing so.

Signature
John W. Kennedy
"The blind rulers of Logres
Nourished the land on a fallacy of rational virtue."
-- Charles Williams. "Taliessin through Logres: Prelude"
Andrew Thompson - 29 Dec 2006 21:00 GMT
> >>> Accept all file filter is default for JFileChooser. I want to remove
> >>> it. How to do it?
> >> You don't. You replace it.
> >
> > How?
...
> If you must, and are on 1.3 or better, setAcceptAllFileFilterUsed(false).
Aaah.. the marvels of ..'modern' technology
( I got away with that, didn't I? ;).
> But every user who wants to damn-well see the "all" list will curse you
> for doing so.
I'm glad you brought that up. It is not something I
have ever attempted (till I saw your first post on it -
which got me curious).
I tend to agree that even if the end-user has no point in
openning a particular file-type in my application, I will
still offer the 'All Files' filter - so they can use it for
navigation (I am used to what most of my more common
directories *look* like in a file filter - it would be a nuisance
to have the contents 'changing' according to what flavor
of files the application likes).
The 'path of least surprise' might suggest it is better
to leave the 'All Files' filter in place.
Andrew T.