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

save dialog doesn't show filename

    Details

    • Subcomponent:
    • CPU:
      sparc
    • OS:
      solaris_2.3, solaris_2.4

      Description

      The save dialog on Solaris doesn't show the filename.
      On NT it does.

      The description field as copied from bug report 1185153 follows:

      FileDialog picks up the directory name part, but not the
      file name part, of the default file name in a FileDialog

      The description field as copied from bug report 1228074 follows:


      FileDialog.setFile(string) doestn set the filename given in the dialog.

      Run the following code after changing the dirstr and filestr appropriately to some
      directory and file.

      public class TestFileDialog extends Applet {
        FileDialog fd;
        Frame frame;
        String dirstr = new String("/usr/green/SCCS_DIRECTORIES/java/src/share/test/awt/");
        String filestr = new String("AddRemoveTest.java");

        public TestFileDialog() {
          frame = new Frame("AppletFrame");
          fd = new FileDialog(frame, "FileDialog");
          frame.resize(100, 100);
          frame.add("Center", fd);
          frame.show();
        }

        public TestFileDialog(Frame f) {
          fd = new FileDialog(f, "FileDialog");
        }

        public void init() {
          fd.setDirectory(dirstr);
          fd.setFile(filestr);
          fd.show();
        }

        public static void main(String argv[]) {
          Frame f = new Frame("TestFD");
          TestFileDialog tfd = new TestFileDialog(f);

          f.resize(200, 200);
          f.add("Center", tfd);
          f.show();

          tfd.init();
          tfd.start();
        }
      }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                gsaab Georges Saab
                Reporter:
                duke J. Duke (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: