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

[Accordion] setFocusTraversable(false) is not working

XMLWordPrintable

      Run this code - expected that the accordion should not participate in focus traversing
      @Override
          public void start(Stage primaryStage) {
              primaryStage.setTitle("Hello World!");
              Button btn = new Button();
              btn.setText("Say 'Hello World'");
              btn.setOnAction(new EventHandler<ActionEvent>() {

                  @Override
                  public void handle(ActionEvent event) {
                      System.out.println("Hello World!");
                  }
              });
              Accordion accordion = new Accordion();
              TitledPane pane = new TitledPane("Title 1", new Button("Ok"));
              accordion.getPanes().add(pane);
              accordion.setFocusTraversable(false);
              HBox root = new HBox(15);
              root.getChildren().addAll(accordion, btn);
              primaryStage.setScene(new Scene(root, 300, 250));
              primaryStage.show();
          }

            miflemi Mick Fleming
            slugovoy Sergey Lugovoy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: