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

JFileChooser: NPE when creating read-only file chooser

XMLWordPrintable

    • b43
    • generic
    • generic

      JFileChooser now supports a UI defaults property "FileChooser.readOnly" which
      prevents creation of new folders and renaming files. If setting this property
      to false, then FilePane crashes with a NullPointerException.

      java.lang.NullPointerException
              at sun.swing.FilePane.addActionsToMap(FilePane.java:354)
              at sun.swing.FilePane.createActionMap(FilePane.java:346)
              at sun.swing.FilePane.<init>(FilePane.java:124)
              at javax.swing.plaf.metal.MetalFileChooserUI.installComponents(MetalFile
      ChooserUI.java:185)
              at javax.swing.plaf.basic.BasicFileChooserUI.installUI(BasicFileChooserU
      I.java:135)
              [...]

      ###@###.### 2004-02-25

            leifs Leif Samuelsson (Inactive)
            leifs Leif Samuelsson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: