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

DirectoryChooser does not open with passed initial directory and title

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: fx2.1
    • Fix Version/s: None
    • Component/s: javafx
    • Labels:
      None
    • Environment:

      Windows 7 (64-Bit)
      JavaFX 2.1 SDK
      JDK 1.7.0_02

      Description

      I have a problem with DirectoryChooser. On my machine the dialog is opened, but not with the initial directory and title passed to the DirectoryChooserBuilder.
      It looks like these parameters are just ignored.

      package javafx.test;
       
      import java.io.File;
       
      import javafx.application.Application;
      import javafx.scene.Group;
      import javafx.scene.Scene;
      import javafx.stage.DirectoryChooser;
      import javafx.stage.DirectoryChooserBuilder;
      import javafx.stage.Stage;
       
      public class Main extends Application {
       
      @Override
      public void start(Stage stage) {
      Scene scene = new Scene(new Group());
      stage.setScene(scene);
      stage.show();
       
      DirectoryChooser dc = DirectoryChooserBuilder.create().initialDirectory(new File("c:\\")).title("Directory chooser").build();
      dc.showDialog(scene.getWindow());
       
      }
       
      public static void main(String[] args) {
      launch(args);
      }
      }

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              lnerad Ľubomír Nerád
              Reporter:
              duke J. Duke (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported: