-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
1.3.0
-
x86
-
windows_nt
Name: skT88420 Date: 09/14/99
=20
1. Just using \JDK1.3demo\JFileChooserDemo\JFileChooserDemo.jar. When"open =
Dialog" or "save Dialog" opened,I select one file named "1234" in List of D=
ialog, then change "4321" in the Field "File name", select "metal" or "wind=
ows" RadioButton. After click open or save button,I always get message "No =
file was chosen"! if I use Motif UI, it's OK.
2. The source code is:
public void actionPerformed(ActionEvent e) {
=09int retval =3D chooser.showDialog(frame, null);
=09if(retval =3D=3D JFileChooser.APPROVE_OPTION) {
=09 File theFile =3D chooser.getSelectedFile();
=09 if(theFile !=3D null) {
=09=09if(theFile.isDirectory()) {
=09=09 JOptionPane.showMessageDialog(
=09=09=09frame, "You chose this directory: " +
=09=09=09chooser.getSelectedFile().getAbsolutePath()
=09=09 );
=09=09} else {
=09=09 JOptionPane.showMessageDialog(
=09=09=09frame, "You chose this file: " +
=09=09=09chooser.getSelectedFile().getAbsolutePath()
=09=09 );
=09=09}
=09=09return;
=09 }
=09}
=09JOptionPane.showMessageDialog(frame, "No file was chosen.");
}
3. None.
4.None.
5.The output of the commands "java -version" is:
java version "1.3beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3beta-O)
Java*TM) HotSpot Client VM (build 1.3beta-O,mixed mode)
The output of the commands "java -fullversion" is:
java full version "1.3beta-O"
(Review ID: 95141)=20
======================================================================
- duplicates
-
JDK-4271669 JFileChooser.getSelectedFile() return null in JDK1.3 beta
-
- Resolved
-
- relates to
-
JDK-4300582 Can not Save file as a new file(NullPointerException)
-
- Closed
-