JDK-5045464 : Regression: GTK L&F, JFileChooser shows "null/" in folder list
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 5.0
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2004-05-11
  • Updated: 2004-06-14
  • Resolved: 2004-06-14
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0 b56Fixed
Related Reports
Relates :  
Relates :  
Description
The fix for bug 4959456 was not complete. If the L&F is changed to GTK after creating a JFileChooser, then the first item in the folder is "null/".

This is reproducible in 1.5 beta1 and the latest build (b50).

Test case:


import javax.swing.*;

public class bug5045464 {
    public static void main(String[] args) {
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                JFileChooser fc = new JFileChooser();
                try {
                    UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel");
                    SwingUtilities.updateComponentTreeUI(fc);
                    fc.showOpenDialog(null);
                    System.exit(0);
                } catch (Exception ex) {
                    System.err.println(ex);
                    System.exit(1);
                }
            }
        });
    }
}


###@###.### 2004-05-11

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger-rc FIXED IN: tiger-rc INTEGRATED IN: tiger-b56 tiger-rc
08-07-2004

EVALUATION When changing L&F to GTK, no DIRECTORY_CHANGED_PROPERTY event is fired and the curDir member in GTKDirectoryListModel is not initialized. It should be initialized to the current directory of JFileChooser. ###@###.### 2004-05-11 Name: anR10225 Date: 05/20/2004 this field might be initialized on GTKDirectoryListModel creation. ======================================================================
08-07-2004