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

DirectoryChooser does not open with passed initial directory and title

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • fx2.1
    • javafx
    • None
    • Windows 7 (64-Bit)
      JavaFX 2.1 SDK
      JDK 1.7.0_02

      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);
      }
      }

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

              Created:
              Updated:
              Resolved:
              Imported: