-
Bug
-
Resolution: Fixed
-
P4
-
1.2.0
-
1.2.2
-
x86
-
windows_95
Name: tb29552 Date: 11/14/98
I found unaccepatable source-corde in "FileSystemView.java" as follows...
/**
* Returns all root partitians on this system. On Windows, this
* will be the A: through Z: drives.
*/
public File[] getRoots() {
Vector rootsVector = new Vector();
// Create the A: drive whether it is mounted or not
WindowsFloppy floppy = new WindowsFloppy();
rootsVector.addElement(floppy);
// Run through all possible mount points and check
// for their existance.
for (char c = 'C'; c <= 'Z'; c++) {
char device[] = {c, ':', '\\'};
String deviceName = new String(device);
File deviceFile = new File(deviceName);
if (deviceFile != null && deviceFile.exists()) {
rootsVector.addElement(deviceFile);
}
}
File[] roots = new File[rootsVector.size()];
rootsVector.copyInto(roots);
return roots;
}
/**
* Fake the floppy drive. There is no way to know whether
* it is mounted or not, and doing a file.isDirectory or
* file.exists() causes Windows to pop up the "Insert Floppy"
* dialog. We therefore assume that A: is the floppy drive,
* and force it to always return true for isDirectory()
*/
class WindowsFloppy extends File {
public WindowsFloppy() {
super("A" + ":" + "\\");
}
public boolean isDirectory() {
return true;
};
}
NEC PC use System-Drive for A:
and use Floppy-Drive for C;
so,under current JDK1.2, we cannot get satisfied
behavior with JFileChooser.
(Review ID: 42748)
======================================================================
Name: clC74495 Date: 07/13/99
I can not select any files on the HDD which drive letter is
'b:' in the swing file chooser(JFileChooser) on NEC PC-9821.
HDD a: b:
FDD c:
CDROM d:
(Review ID: 85500)
======================================================================
- relates to
-
JDK-4178018 Null pointer exception in SwingSet example - FileChooser
-
- Resolved
-