Name: jl125535 Date: 01/20/2004
FULL PRODUCT VERSION :
java version "1.5.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta2-b33)
Java HotSpot(TM) Client VM (build 1.5.0-beta2-b33, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
SunOS zircon 5.8 Generic_108528-24 sun4u sparc SUNW,Sun-Blade-100
EXTRA RELEVANT SYSTEM CONFIGURATION :
none
A DESCRIPTION OF THE PROBLEM :
With Motif look-and-feel, the Update button in the JFileChooser
does not appear to be working. Newly created files are not
displayed when the Update button is pushed.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Open a JFileChooser
2. Navigate to a directory of your choice
3. In a UNIX shell, create a new file in that directory
4. Push the Update button in the JFileChooser and note that the new file does not appear.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Pressing the Update button in the JFileChooser should refresh the list of files displayed, similar to calling JFileChooser.setCurrentDirectory.
ACTUAL -
There is no change to the list of files when the Update button is pressed.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
/*
* In JDK 1.4.2 with Motif Look-&-Feel, the JFileChooser has an
* Update button that is supposed to refresh the file list.
* This button doesn't work. This is apparently a Java bug, but
* was not found in Sun's Bug Parade.
*
* This example demonstrates that there are no events associated
* with the Update button, so there's nothing that an application
* programmer can do to work around this.
*
*/
import java.awt.event.*;
import javax.swing.*;
public class ChooserListener
implements ActionListener
{
public ChooserListener() { }
public void actionPerformed( ActionEvent event )
{
System.out.println( event );
}
public static void main( String[] args )
{
try
{
UIManager.setLookAndFeel( "com.sun.java.swing.plaf.motif.MotifLookAndFeel" );
JFileChooser chooser = new JFileChooser();
chooser.addActionListener( new ChooserListener() );
chooser.showOpenDialog( null );
}
catch ( Exception e )
{
e.printStackTrace();
}
System.exit(0);
}
}
---------- END SOURCE ----------
(Incident Review ID: 228909)
======================================================================
Reproducible with FileChooserDemo. Compare with behavior of dtpad's
file chooser.
###@###.### 2004-03-09