-
Bug
-
Resolution: Fixed
-
P1
-
5.0
-
b41
-
generic, x86, sparc
-
generic, solaris_2.6, solaris_10, windows_98, windows_nt, windows_2000, windows_xp
-
Verified
I have noticed the following when comparing the behavior with the previous build:
1. On the previous build this works fine.
2. On the PIT build, navigating to a sub-dir that has only files (not dir) makes the first file selected by default.
3. If the visited sub-dir contains another dir, that dir is shown as selected and file dialog does not hang.
4. Once the first file in the visited dir is selected by default, i am unable to change it to a diff file name. Even if I specify a new file name, it still shows an overwrite warning dialog saying the file already exists. So it does not take the new file name.
This is noticed only on the following PIT build, on all platforms:
java version "2d.pit-jcg-sparc-01-2004-01-18.tiger"
Java(TM) 2 Runtime Environment, Standard Edition (build 2d.pit-jcg-sparc-01-2004-01-18.tiger)
Java HotSpot(TM) Client VM (build 1.5.0-beta2-b33, mixed mode)
This is not reproducible on Tiger-b32a. I tested this on Win XP, Solaris 9(GNOME).
I have attached a tar file. Untar it and you will find an app - PrintDlgApp.java. Execute the application. A print dialog will pop up. Click the 'PrintToFile' option. A file dialog will appear showing a dir 'output'. Open the 'output' dir. Inside the output dir, you would find 2 ps files out of which the first one will be shown as selected. Now try coming back to the parent folder by clicking the 'UP' icon or by choosing from the drop-down. If nothing happens and if you still remain in the same dir, the bug is reproduced.
-----------------------------------------------
###@###.### 2004-02-23
Same problem reported by a CAP member:
J2SE Version (please include all output from java -version flag):
java version "1.5.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta2-b38)
Java HotSpot(TM) Client VM (build 1.5.0-beta2-b38, mixed mode)
Does this problem occur on J2SE 1.3, 1.4 or 1.4.1? Yes / No (pick one)
No, works fine with build32c.
Operating System Configuration Information (be specific):
Windows 2000 Professional SP2
Redhat 9.0
Hardware Configuration Information (be specific):
Custom built Athlon 600MHz, TNT2 AGP, 384MB
Bug Description:
A JFileChooser with its FileSelectionMode set to DIRECTORIES_ONLY or
FILES_AND_DIRECTORIES will not respond to attempts to change directory
via the 'Look in:' drop-down or the 'Up one level' button.
The behaviour seems to have changed at some point after b32c and is
evident in both b36 and b38.
Steps to Reproduce (be specific):
Compile and run the following class, then attempt to select a different
directory using the 'Look in:' drop-down or the 'Up one level' button.
JFileChooserTest.java
=====================
import javax.swing.JFileChooser;
public class JFileChooserTest {
public static void main(String[] args) {
JFileChooser fc = new JFileChooser();
fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
fc.showOpenDialog(null);
}
}
--------------------------------------------------------
###@###.### 2004-03-08
Same problem reported by another CAP member:
J2SE Version (please include all output from java -version flag):
java version "1.5.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta2-b40)
Java HotSpot(TM) Client VM (build 1.5.0-beta2-b40, mixed mode)
Does this problem occur on J2SE 1.3.x or 1.4.x?
No
Operating System Configuration Information (be specific):
Metal look and feel
Hardware Configuration Information (be specific):
not hardware specific
Bug Description:
The file which set with setSelectedFile() method
does not displayed in the file name field
display other file ( the 1st file in a directory )
and can not change directory.
Steps to Reproduce (be specific):
run following program
//-------------- JFileChooserBug2.java ------------------------------
import javax.swing.*;
import java.io.*;
class JFileChooserBug2 {
public static void main(String[] args) {
JFileChooser jfc = new JFileChooser();
File file = new File(
"c:\\Program Files\\Java\\j2re1.5.0\\bin\\client\\Xusage.txt" );
jfc.setSelectedFile( file );
int ret = jfc.showOpenDialog( null );
System.exit(0);
}
}
//-------------------------------------------------------------------
- duplicates
-
JDK-4990476 Regression: JFileChooser return null value when user select a nonexist file
- Closed
-
JDK-4997128 JFileChooser broken between 1.5.0b32 and 1.5.0b35
- Closed
-
JDK-4980454 PIT: "PrintToFile" feature is broken for cross-platform print dialog
- Closed
-
JDK-4982442 JFileChooser.getSelectedFile() behaves differently
- Closed
-
JDK-4984285 JCP: Unable to change the Cache location using JFileChooser
- Closed
-
JDK-4985297 JFileChooser's navigation buttons does not respond after clicking Recent
- Closed
-
JDK-4988464 JFileChooser issue
- Closed
-
JDK-4992821 REGRESSION: .../MetalFileChooserUI/DirectoryComboBoxAction/index.html#Public fai
- Closed
-
JDK-4992869 REGRESSION: TCK1.2-JNLP .../FileSaveService/index.html#interactive fails
- Closed
-
JDK-5008447 Calling setCurrentDirectory in JFileChooser does not show JFileChooser
- Closed
-
JDK-4987583 REGRESSION:Some tests for JFileChooser fail with jdk15-beta2-b36
- Closed
- relates to
-
JDK-4922507 JFileChooser works with keyboard incorrectly sometimes
- Closed