Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-5045464

Regression: GTK L&F, JFileChooser shows "null/" in folder list

    Details

    • Subcomponent:
    • Resolved In Build:
      b56
    • CPU:
      generic
    • OS:
      generic

      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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                naasunw Naa Naa (Inactive)
                Reporter:
                leifs Leif Samuelsson (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: