-
Bug
-
Resolution: Cannot Reproduce
-
P5
-
None
-
1.4.0
-
x86
-
windows_nt, windows_2000
Name: nt126004 Date: 09/10/2001
java version "1.4.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta2-b77)
Java HotSpot(TM) Client VM (build 1.4.0-beta2-b77, mixed mode)
Here are 16 JFileChooser bugs under the Windows LNF.
(tested under jdk 1.4 beta 2 build 77 and Win 2000).
These bugs seems so insignificant that you probably won't
fix (I hope that's not the case) however from a user's
perspective it is a problem: these bugs clearly show that
the application isn't a native windows application.
sometimes the users complain about these things.
So bug 4268204 (Windows Look&Feel doesn't look and feel like Windows)
isn't completely fixed and should be reopened and really fixed.
You need to load the JFileChooser demo shipped with the jdk (then select windows
look and feel and open the file chooser). To see the difference between JFileChooser
and the native Windows file chooser load Notepad too, and select Open File. Now put
the two file choosers side by side, and look at my bug reports.
All the problems are related to the Windows look and feel, not metal or Motif.
If you want I can provide some screenshots which shows the
bugs and the differences with the native windows filechooser.
In any case, here are further descritions of the problems:
1) open a JFileChooser (using the jdk demo). look at the
text field and combobox at the botton of the dialog (the ones
with the file type and the file name). they are too big!
now open a native windows file chooser (use notepad as an
example or any other standard windows program) and see
yourself the difference. arent' these ones smaller?
so you must reduce the size of the JFileChooser text filed
and combobox.
I really cannot send you a test case, because this gui
error is in the JFileChooser code.
2) open a JFileChooser and a native window file chooser.
arrange them side by side.
now in JFileChooser you have to click once on a file.
the JFileChooser "selects" the file you have clicked:
now the filename and the icon are selected: a blue
rectangle is drawn around them (both icon and filename).
in particular note how the icon's background turns to blue
(before clicking it was white).
now look at windows file chooser and do the same. you see
that when the icon is selected, the white parts of the icon
are drawn in blue but the icon's background remains white!
this is definitely a different behaviour in the two choosers.
and users are sensitive to this kind of differences, so they
almost instantly says "hey this programs is strange, i don't
like it..."
3) look at JFileChooser: when I click a filename once to rename
it, a 3D border is drawn around it.
now look at native windows chooser: the border drawn isn't 3D,
it is a simple black line with a FLAT appearance.
4) open the native windows file chooser and click on the "My Computer"
button on the left: if you have a cdrom, make sure it is empty, then
click on its icon. windows asks you to insert a cdrom.
now open JFileChooser and do the same: jfilechooser shows you an emtpy
list, even if the cdrom isn't there. this is misleading. it should ask
you to insert a cdrom.
5) in JFileChooser using the "details" view, click once to rename
a file, the border drawn around the filename is too little, and
the font isn't completely visible, so a part of the filename is
overwritten by the border, and it is unreadable.
6) in JFileChooser using the "details" view, click once to rename
a file, the file icon disappears and is replaced by the usual
border drawn around the filename, as before.
now look at the native file chooser: repeat the same steps, and you
see that the icon remain there! it doesn't disappears as in swing.
7) this isn't always reproducible. in JFileChooser using the list view
(not details view) sometimes the icons and filenames are too close
to each other: the end of a filename is too close to the icon
of the filename to its right, making it difficult to read.
now look at the native file chooser: the correct behaviour is
to ALWAYS leave some pixels between the end of a file and the
icon of the file at his right.
8) look at the windows native filechooser: it is able to delete
a directory using the del key, or by right clicking on the file
and choosing "delete" from the popup menu.
now try with JFileChooser: you can't delete a directory. so add
at least the support for the delete key, if not the popup menu.
9) look at the windows native filechooser: you can create a directory
by clicking one of the little buttons at the top of the window. do it.
where does the new directory appears? as you see all newly created
directory always appears as the last entry in the file list.
if the end of the list isn't already visible, then the list is
scrolled to make it visible. then the new directory is created, and
is added as the last entry.
now look at the JFileChooser: it doesnt' put the new directory
at the end, like windows.
10) look at JFileChooser: look at the the font used in the 2 comboboxes
and the text field (there is one comboxbox for the available devices
at the top, one text filed for the filename and a combobox for file
type at the bottom of the dialog)
this font isn't the default windows font (it is the same font family,
but it is bigger). and it is different from the font used in other parts
of the same JFileChooser (like buttons labels, for example).
if you look at the native windows file chooser, you see that it is
always used the same font, for ALL components, and that font isn't
any font, it is the DEFAULT windows font. jdk 1.4 add support for
detecting at runtime the default windows font, so why not use this
feature?
11) look at the native windows file chooser, select the "details" view,
now select C: and look at the PAGEFILE.SYS file. look at its icon.
this is the icon for files without their own icon registered in the
system. there are lots of files with this icon. you can think of it
as the "default" icon for unrecognized file types.
now look at JFileChooser, select "details" view, go to C: and look at
the same file as before: the top of the icon isn't visible. it is
truncated, there isn't enough vertical space for the icon!
12) configure windows to show all files, even the hidden files (to do this
under windows 2000 open "My Computer", select the "Tools" menu and then
select "Folder Options". there you'll find the option to show hidden files)
now open the native windows file chooser, go to C:\ and look at the hidden
files: they are the ones with the light coloured icon.
now open JFileChooser and go to C:\ and look the hidden files.... ops!
they aren't shown at all. so what I can do to select an hidden file?
13) open the native windows file chooser, select the "details" view, look
at the labels on the first row (Name, Dimension, Type, etc)
now open JFileChooser, select details view, look at the first row of
the filenames table: the labels are horizontally CENTERED, however
under windows 2000 they're LEFT aligned.
14) open the native windows file chooser and click on the "My Computer"
button on the left: the main panel instantly shows a list of the
various devices avaiable in the system (like A:, C:, etc)
now open JFileChooser and do the same: the floppy-disk light turns on,
an ugly noise is produced, there's a little pause, then the devices
finally appears. this happens everytime i click that button: it's
really irritating (the pause and the ugly noise).
15) open the native windows file chooser and click on the "My Computer"
button on the left: the main panel instantly shows a list of the
various devices avaiable in the system (like A:, C:, etc)
now click on a local disk, like C: for example, and note that the
"MY Computer" button on the left is it DESELECTED.
if you want to see again the devices then click it once again.
now open JFileChooser and do the same: the "My Computer" button remains
selected. if you want to see again the devices then you cannot single
click it, because its already selected: you have to choose another button
and then click "My Computer" again.
16) open the native windows file chooser and select the "details" view.
now select a file and hit enter on your keyboard: the chooser closes
and you have selected that file.
now open JFileChooser, select "details" view, select a file and hit
enter on the keyboard: the selected file is deselected, and is
selected the file under it. if it was the last file then the first
file is selected.
thanks for reading this loong bug report. hope it will be useful.
(Review ID: 131637)
======================================================================
- relates to
-
JDK-4137653 JFileChooser: can't use delete key to delete files and directories
- Open
-
JDK-4835500 JFileChooser: Enter key behaves incorrectly in Details view
- Closed
-
JDK-4835466 JFileChooser/Windows L&F: border drawn differently when renaming a file
- Closed
-
JDK-4835469 JFileChooser/Windows L&F: Newly created directories should appear at end of list
- Open
-
JDK-4404456 Merlinb46:JFileChsr:In WinL&F File/Folder icon disappers when you try to rename
- Open
-
JDK-4835479 JFileChooser/WindowsL&F: show hidden files if set in native Folder Options
- Resolved
-
JDK-4835498 JFileChooser/WinL&F:"My Computer" sidebar button should become deselected
- Resolved
-
JDK-4444978 Win2000 L&F: JFileChooser: High-lighting
- Closed
-
JDK-4781716 JFileChooser must respond as usual to floppy drive selection
- Closed
-
JDK-4835483 JFileChooser/WindowsL&F:Details view column headings should be left-justified
- Closed