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

FilenameFilter doesn't work with FileDialog

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.1.1
    • client-libs
    • None
    • x86
    • windows_95, windows_nt



      Name: sgC58550 Date: 06/30/97


      public class MyFrame extends Frame implements FilenameFilter
      {
          // Constructors and other code go here ...

          public testDialog()
          {
              FileDialog dialog;
              dialog = new FileDialog(this, "title", FileDialog.LOAD);
              dialog.setFilenameFilter(this);
              dialog.show();
          }

          public boolean accept(File dir, String name)
          {
              return name.endsWith(".txt");
          }
      }

      In my testing, accept() never gets called. Also, it makes no
      difference whether dialog.addNotify() is called before setting
      the filename filter.

      company - (none) , email - ###@###.###
      ======================================================================
      daniel.indrigo@Canada 1997-08-26 Also fails on Solaris

            lbunnisunw Lara Bunni (Inactive)
            sgoodsunw Sheri Good (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: