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

Label with setFocusTraversable(true) breaks focus traversing

XMLWordPrintable

      Run this code and press Tab key (focus of button gone) and press Tab again - focus traversing is break

       @Override
          public void start(Stage primaryStage) {
              primaryStage.setTitle("Hello World!");
              Button btn = new Button();
              btn.setText("Say 'Hello World'");
              
              Label label = new Label("Text label");
              label.setFocusTraversable(true);
              VBox root = new VBox();
              
              Button btn2 = new Button();
              btn.setText("Say 'Hello World'");
              
              root.getChildren().addAll(btn, label, btn2);
              primaryStage.setScene(new Scene(root, 300, 250));
              primaryStage.show();
          }

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

              Created:
              Updated:
              Resolved:
              Imported: