Submitted On 05-NOV-1997
schesney
We have a requirement to use the FileDialog to
locate and select from a list of directories on
UNIX and Windows (NT and 95). We are concerned
that a simple pattern match filter would not
be able to express this.
Ideally, we would like to see a simple boolean
property that would modify the behavior to select
only directories. The FilenameFilter is acceptable
if it works on both UNIX and Windows; but it looks
like it will never work on at least Windows. A
pattern match would also be acceptable if it we
could create a pattern that selects only
directories.
Submitted On 05-NOV-1997
huxhorn
You can set the filename to something like *.txt
on Win95/NT to do wildcard-filename-filtering.
*.txt;*.html accepts only txt and html files.
Submitted On 27-NOV-1997
wtr-ps
It is definitely needed here, but I would accept it to be postponed for JDK1.2.
Submitted On 01-DEC-1997
dnavas
Setting the filename to *.txt (or whatever) does work for NT, but not for Unix
-- an array based filtering mechanism would be good. While we're at it, we
also need a new file-dialog type per schesney so that we can choose
directories....
Submitted On 02-JAN-1998
fabien
Not fixed in 1.1.5/solaris 2.6
I could do my filtering by setting the wildcard,
but I haven't found how to set it from the API.
Submitted On 08-JAN-1998
jerrybrennock
Selecting a directory is a basic feature that is not handled by wildcard
filtering. If this were an option somehow, wildcard filtering would be an
acceptable near-term workaround for the lack of true filtering.
Submitted On 08-JAN-1998
db
You know, this JDK bug showed up in the first
Java program I ever wrote. It's really visible,
since selecting a file is a BASIC application
feature. I like the model of letting applications
do the filtering; providing a reusable filter
class to do pattern matching (xyz*, *.xyz, etc)
is a lot better than saying you can _only_ do
pattern match based filtering.
Submitted On 12-JAN-1998
mourzelas
I have written my own FileDialog class for Sun
Solaris ( with Filter ). I can give you the sources
files ( It's free !!!)
Submitted On 25-FEB-1998
smb
It's surprising that a feature of the language
as fundemental as a FileDialog could be written and
released knowing that it has not been implemented.
I wonder what other parts of the class structure
don't work ! :(
Submitted On 25-FEB-1998
cjmunno
Windows file dialog allows me to select multiple files with the aid of the
modifier keys (control &shift). Can I do this with the FileDialog? If so,
it escapes me. If not, it would be a nice feature.
Submitted On 10-MAR-1998
wbs
Some form of filter is quite critical for us at
present. We would be content with wildcards or
a FilenameFilter implementation but would have
liked to see it sooner rather than later. :-)
Naturally!
Submitted On 27-MAR-1998
jrudd
Good news for those that use MRJ 2.0. FilenameFilter
works great with it!!! So please sun...don't get
rid of FilenameFilter.
Submitted On 05-MAY-1998
MiguelM
Maybe a new method should be added that tells us
whether or not the file-dialog accepts a filename
filter. This way our code could be written to use
wildcards on shitty platforms that don't support
it, and use a true filename filter on those
well-thought-out platforms that do.
As an example, MouseEvent.isPopupTrigger() works
this way. It lets my code adopt different behavior
on different platforms.
Here are some suggestions for the method name:
boolean supportsFilter()
boolean filterWorks()
boolean isShittyPlatform()
Submitted On 28-MAY-1998
yxiao
We would also like to see the FileDialog to select only directories.
Submitted On 28-MAY-1998
pir
I wonder, that such an important feature of the
FileDialog is not implemented in the JDK1.1.5;
I hope this will be fixed soon ...
( wildcard-filename-filtering would also be ok)
Submitted On 02-JUN-1998
informer
To avoid the problem of suffix matching on the Mac you could write content-type
(MIME) based methods. For example, setFilter("image/*").
See also java.awt.DataFlavor
Submitted On 17-JUN-1998
slac
Has this been fixed in 1.2 yet? Does the swing FileChooser fix this?
Submitted On 23-JUN-1998
swayambhu
I think it FilenameFilter is an important concept
that simply cannot be thrown out. Selecting only
directories or certain files is an important
ability that is worth providing and looking into
further.
Stating that FilenameFilters are not supported
on all platforms in the documentation as a
solution leaves a sour taste about Java. Its
shaking the very foundation it wants to lay.
required
Submitted On 24-JUN-1998
gfullmer
Filename filtering is a very essential feature. Thelso
ability to pick directories only is also needed in
our apps. Simple wildcard filtering would be acceptable
for a short-term fix.
Submitted On 07-JUL-1998
budzel
As "db" also found, this showed up in my very first test program.
Annoying! The alternative JChooser filters OK, but is unacceptably slow to
appear (NOT because of the filtering!).
Having a working file filter is a key part in making Java useful for writing
standalone applications. For Mac, I would also appreciate being able to check
the "four-letter" file type and creator fields.
Submitted On 31-JUL-1998
AmitK
A problem with an important feature like FileNameFilter needs to be fixed very
soon.
Has this bug been fixed in JDK1.2 Beta versions.
Submitted On 17-AUG-1998
kinabaloo
JFileChooser has its own (worse) problems
- at least in 1.0.x
Submitted On 21-SEP-1998
dougmo
I entered code directly from "The Java Class Libraries, Second Edition,
Volume 2", a
Sun book, and code doesn't work as written. I'm just learning Java, but it is
a concern
that the book didn't mention FileDialog setFilenameFilter problem in WIN95 as
part of
the example. I did try addNotify(), and the filter seemed to work, but the
format of the
FileDialog changes to a non standard appearance.
Submitted On 15-OCT-1998
kennyz
The use of the FilenameFilter is a basic
requirement, it is documented, and needs to be
fixed.
Submitted On 02-NOV-1998
Sriniks
We want a feature in the FileDialog, that will let the user select only
directories. We want to use only AWT. So if possible, some option like
JFileChooser.setFileSelectionMode() function may be provided.
Submitted On 05-DEC-1998
Nocturnal
There is a seperate bug report asking for a
directory chooser - no. 4037524.
Sun, please fix both these bugs.
Submitted On 07-FEB-1999
jdcjdc
AWT will very soon be obsoleted by JFC. Is this
bug still relevant?
Submitted On 08-FEB-1999
Rogman
Why don't you guys cooperate with Microsoft once in a while? Why don't you add
an overloaded version of setFilenameFilter() that will accept a string that
represents an MS Windows filename filter criterion, and have that version of
setFilenameFilter() work on Windows 32-bit systems?
Submitted On 17-FEB-1999
ronh
Also, using the FileDialog in SAVE mode, on WinNT, it would be very nice to be
able to supply those "save as type" settings. Then you don't have to
kludge in some equivalent device into your user interface, when a perfectly
good one already exists on the platform.
Submitted On 19-FEB-1999
eliasbroms
We have this bug in 1.1.6, Solaris.
Submitted On 11-MAR-1999
dwegner
How about putting this in the documentation?
Something like "THIS DOESN'T WORK SINCE WE DIDN'T
BOTHER TO IMPLEMENT IT."
Submitted On 07-APR-1999
mfarrent
So I wasted half a day trying to do something that was never possible in the
first place.
Can't such things be mentioned in the documentation?
Submitted On 10-APR-1999
esslinger
I am also disapointed about not working
FileNameFilter with FileDialog under win32.
It does not work in JDK1.2 either!
And the Filechooser is not working correctly:
No switch between "details & lists",
leftover Debug-printout during runtime
and the worst: no ability to choose a differnet
language than englisch.
Kurt
Submitted On 03-MAY-1999
martinr2
I absolutely agree with dwegner and mfarrent.
Folks at Sun, please put that into the documentation so that people don't
waste their time.
Submitted On 03-MAY-1999
miles
setFile("*.java"); seems to work under w95.
(jdk 1.1.7a, jview)
J++ wfc has a fully featured file dialog;
Haven't compared it with swing's, but I hope
the swing team had the sense to snatch the
worthwhile ideas from it.
[ miles ]
Submitted On 06-MAY-1999
hhaining
This BUG is from JDK1.0 to JDK1.2
Why not tell me in the help docs,
so I will not waste my time on this
problem.
I hope all known bugs should be
wroten in the help docs.
Submitted On 08-JUN-1999
hoorner
I strongly recommend that you include a note in the
javadoc documentation and your documentation web pages
that indicate methods that are not implemented. It would
be better to know that a method does not work BEFORE using it
rather than find out after writing 100 lines of code dependent
on it and spending hours trying to find the bug.
Submitted On 17-JUN-1999
eddy
I know that this has been mentioned repeatedly but I think it's important
enough to mention again. PLEASE ADD DOCUMENTATION when you know something
is not implemented or isn't working correctly. This will save developers a lot
of time and headaches.
Submitted On 08-JUL-1999
dave8
Wow, look documentation on this feature THAT WAS NEVER IMPLEMENTED! How many
years of programmer time has been wasted because sun won't take 2 minutes to
stick this in the documentation files. I would think after reading all these
complaints I wouldn't have to waste so much time trying add a FilenameFilter, I
guess I need to stop thinking.
Submitted On 15-JUL-1999
wpe
Here's a thought. Why not deprecate the
getFilenameFilter and SetFilenameFilter methods,
if said functionality is unfeasible. Or introduce
a new tag for functions that don't yet do what
they claim to. How about using the @deceptive or
@justkidding tag? How long has it been now?
Submitted On 01-AUG-1999
birbilis
Have you noticed that Swing's JFileChooser's dropdown doesn't show the items
indended to seem like a tree as Windows does at its File Dialog's dropdown box?
And that "Desktop" isn't the root of the tree as the user would
expect, but is hidden somewhere in the Windows dir (its real location)
Submitted On 09-AUG-1999
bitusmaximus
C'mon Sun, JFileChooser looks terrible under Win32, and its extremely slow
(plus the fact that it insists on scanning my zip drive when there is no disk
there). Fix the original one, or re-document the methods to include the comment
"NFG"
Submitted On 10-AUG-1999
jrudd
Well the good news is maybe Sun will finally fix this for windows when W2K gets
released. W2K has new style bits for the OPENFILENAME structure that they
could use to do the filtering fairly easily.
So after three years this bug might actually be fixed.
Submitted On 23-NOV-1999
kuhse
Well, since JFileChooser does not work anymore
(bug #4271669) it seems like FileDialog is the
only alternative that is left anyway.
Submitted On 12-JAN-2000
josher
HELLO?!! Unhappy programmer number 25349 reporting:
If you know it's broken and you don't intend to
fix it, you must DOCUMENT this fact!
I've just wasted the past two hours puzzling over
my code, poring over your documentation, and even
digging out the API sources...
Finally, I discover the reason why my FilenameFilter
isn't being called... From the BUG DATABASE!
And the problem was reported NEARLY THREE YEARS AGO!!!
Grrr...
This is shoddy, unprofessional work!
You should be ashamed.
You MUST add some mention of the shortcomings of
the FileDialog to the API docs!
Submitted On 03-FEB-2000
mzip
I totally agree:
This is shoddy, unprofessional work!!!
At least fix your documentation!
Submitted On 05-MAR-2000
miles
While you're at it, document that fact that you can use wildcards to filter in windows.
Too bad the original Java design won't work, because sometimes you want to look at the
magic number, not the extension. Oh well, I'm switching to Linux anyways.
Submitted On 06-MAR-2000
john.dempsey
yet another programmer who has wasted time trying to find out while filename filters won't work with file dialogs ...
why can't you say so in the documentation if it won't be fixed ...
Submitted On 15-MAR-2000
amnelson
And another programmer wasting a lot of valuable time on trying to get something so simple as a file dialog
filename filter working, only to find out that it's not even implemented - and of course no mention of this
exists in the documentation!
Submitted On 21-MAR-2000
congressman
Add my name to the list of those who have wasted 2+ hours trying to get this
BASIC functionality to work. FIX IT or WRITE IT UP, it REALLY IS JUST THAT
SIMPLE.
thompson
Submitted On 31-MAR-2000
Runemal
You can add me to the list of frustrated programmers...
Submitted On 29-MAY-2000
SoftTouch
Thank you for documenting the fact that it doesn't work on
Windows! I've been waiting for that a long time. Why don't
you guys support filtering by regular expressions and
wildcarding? Unix does it, and so does Windows. Get rid of
this filtering scheme. Most programmers have no need to
filter by date, attributes (permissions), or any other file
field. Even the equivalent of a few predefined wildcards
would be good, like MIME. There is no need to worry about
this stuff working on OS/2 because IBM will no longer
support this old operating system. I don't think this a
Windows bug, I think its a Mac bug. Having Java or your own
program go through all the files for filtering is way too
time consuming, especially when a novice programmer does
this. Please consider implementing a proper filename
filtering scheme API with regular expressions, wildcards,
or at least MIME.
Submitted On 24-JUL-2000
mbcx4jrh
Oh, and Microsoft and Sun helping (i.e. hindering) each
other to sort this problem out. Ever heard the expression
'The blind leading the blind'?
Submitted On 24-JUL-2000
mbcx4jrh
Quote :
"I'd therefore vote that we extend the API to support suffix
wildcarding, with the documentation saying that
FilenameFilters are not supported on all platforms (we've
done it before with other poorly thought-out cross-platform
APIs, such as tear-off menus)."
Finally someone at Sun who is honest about the state of
Java. Note that this evaluation comment was added in June
1997 - 3 years on and not much has changed really - I
particularly liked the bit about poorly thought-out APIs. So
much for cross-platform and write once, run anywhere. More
like write once, run away.
Submitted On 24-SEP-2000
asjohns1
I just wanted to add my name to the list of people who have tried to get the filenamefilter to work with
FileDialog and have found out that it doesn't work. I also tried the JFileChooser (or whatever it's called in
Swing), but found it to be slow and visually unappealing. I sincerely hope this gets fixed.
Submitted On 17-JAN-2001
sheptunov
After some jerking with this component under Windows 95 (4.00.950 B), I found that it worked for me if I
specify the file masks like that:
dlgFile.setFile("*.csv; *.ini");
It still does not display correctly (in "Files of type" combobox it says "all files only", and displays my mask in
initial "file name" edit box), but it only allows you to choose INIs or CVSs in this case.
May be this would help someone.
2Sun: poor job. You should have it documented, it would save lots of time for everyone.
Submitted On 16-MAR-2002
calenz
This is terrible. Can't believe such a simple file dialog
filter is not implemented in Java. Tried many times with
this filename filter, only to chance upon this page that
this is a bug! What a waste of time...
Submitted On 16-JUL-2002
Blind_Stevie
I just want to add my input to this list of complaints about the
lack of documenation and functionality of the AWT "file
selection dialog" on Windows systems. I also want to wish
you a nice day.
Submitted On 12-SEP-2002
Gniarf
Submit Date Feb 10, 1997
Description FileDialog doesn't call FilenameFilter.accept().
State Closed, will not be fixed (2000-02-29)
2002-09-12, I left Java 3 years ago to things that actually
works or can be fixed (read : perl and assorted GUI toolkits),
man that was my smartest move in years...
Submitted On 26-OCT-2002
evanherck
Ok, so the docs are in finally. But lets face it, JFileChooser,
like many other Swing components is just complete and uther
rubbish if you want a system dependent look. I have spent
countless hours discovering bugs and not yet implemented
stuff you can't even begin to imagine (take a look at the finer
points of java.text and java.awt.font etc and you'll find true
gems of utter incomptence).
They're finally cleaning up there act it seems by providing
1.4.1 which is a pure bugfix release but guys ... it's way too
late. Deprecate it or fucking remove it (it won't break code
cause it never ever worked anyways)
Submitted On 23-FEB-2005
uncleHohoho
The is totally pathetic. Even SWT has implemented this without any problems.
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|