JDK-4980853 : Update button in JFileChooser does not work with Motif Look-And-Feel
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.1,5.0
  • Priority: P3
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: solaris_8
  • CPU: sparc
  • Submitted: 2004-01-21
  • Updated: 2004-04-02
  • Resolved: 2004-04-02
Related Reports
Relates :  
Description

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

Comments
EVALUATION Name: keR10081 Date: 03/10/2004 We loose update notification somewhere in MotifFileChooserUI. Need to fix this. ###@###.### ====================================================================== Name: keR10081 Date: 04/02/2004 This bug is no longer reproducible (at least starting from 1.5.0build45) and is fixed with fix for bug 4872980. Closing as not reproducible. ###@###.### ======================================================================
24-08-2004