setDirectory() is broken in win32

XMLWordPrintable

    • Type: Bug
    • Resolution: Cannot Reproduce
    • Priority: P4
    • None
    • Affects Version/s: 1.1
    • Component/s: client-libs
    • sparc
    • solaris_2.5

      Run the program below using JDK1.1 under win95 or NT4.0b2. It will
      pop-up a FileDialog. Notice the selected directory is that of the working
      directory of the program, not "\\tmp"


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

      iimport java.awt.*;

      class Main {
          public static void main(String argv[]) {
      Frame f = new Frame("Mumble");
      Panel p = new Panel();
      f.add(p);

      f.setLayout(new GridBagLayout());
      f.resize(600, 450);
      f.show();

      FileDialog d = new FileDialog(f, "Something", FileDialog.SAVE);
      d.setDirectory("\\tmp");
      d.setFile("12.foo");
      d.show();
      String fn = d.getFile();
      String dn = d.getDirectory();
      System.err.println("Got a filename of "+fn+" and a directory of "+dn);
          }
      }

            Assignee:
            Ranganathan Ram (Inactive)
            Reporter:
            Eduardo Pelegrillopart (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: