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

JFileChooser.setSelectedFile(File) throws unexpected IllegalAccessError.

XMLWordPrintable

    • sparc
    • solaris_2.5.1



      Name: aaC67449 Date: 05/27/98


      JFileChooser.setSelectedFile(File) throws unexpected IllegalAccessError.
         
      ------------------Example 1-----------------------------------
      import java.awt.swing.*;
      public class Test {

        public static void main(String arrgv[]) {
           JFileChooser c = new JFileChooser();
           c.setSelectedFile(new java.io.File("test"));
        }

      }
      -------------------Output------------------------------------
      Exception in thread "main" java.lang.IllegalAccessError: try to access class java/awt/swing/plaf/basic/BasicDirectoryModel from class java/awt/swing/plaf/metal/MetalFileChooserUI
              at java.awt.swing.plaf.metal.MetalFileChooserUI.ensureFileIsVisible(MetalFileChooserUI.java:393)
              at java.awt.swing.JFileChooser.ensureFileIsVisible(JFileChooser.java:338)
              at java.awt.swing.JFileChooser.setSelectedFile(JFileChooser.java:250)
              at Test.main(Test.java:6)



      ======================================================================

            jeff Jeff Dinkins
            aalievsunw Artem Aliev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: