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

FileChooser does not show up

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2 P2
    • None
    • fx2.0
    • javafx
    • None
    • FX b46 and b45
      JDK 6u24 and 6u26
      Win7 32 and 64 bit

      This has occured to 2 of our internal testers for the Scene Builder, using respectively Windows 7 64-bit and 32-bit.
      The FileChooser does not show up (whatever the action supposed to bring it up), and no exception/ warning is displayed in the console.

      Jan Stola has reproduced the problem outside of the tool, using the simple test case below (quoting him here):

      "Running with assertions enabled makes no difference. I can see some debugging messages painted by the tool (like fps and memory consumption), but FileChooser still cannot be opened and no exception/warning is displayed.

      On the other hand, the problem doesn't seem to be specific to your tool. I tried to write a small test-case:

      package test;

      import javafx.application.Application;
      import javafx.event.ActionEvent;
      import javafx.event.EventHandler;
      import javafx.scene.Scene;
      import javafx.scene.control.Button;
      import javafx.stage.FileChooser;
      import javafx.stage.Stage;

      public class Main extends Application {
         
          public static void main(String[] args) {
              Application.launch(args);
          }

          @Override
          public void start(final Stage primaryStage) {
              Button button = new Button("Show FileChooser");
              button.setOnAction(new EventHandler<ActionEvent>() {
                  @Override
                  public void handle(ActionEvent t) {
                      FileChooser chooser = new FileChooser();
                      System.out.println(chooser.showOpenDialog(primaryStage));
                  }
              });
              Scene scene = new Scene(button, 200, 50);
              primaryStage.setScene(scene);
              primaryStage.show();
          }
         
      }

      that also doesn't show FileChooser and the showOpenDialog() method returns null silently."

            art Artem Ananiev (Inactive)
            svienot Simon Vienot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: