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

ToolBar lookup

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • 9
    • 7u25
    • javafx

      I'm running on javafx.runtime.version=8.0.0-ea-b103

      With this simple application :

      @Override
          public void start(Stage primaryStage) throws Exception {
              BorderPane borderPane = new BorderPane();

              ToolBar toolbar = new ToolBar();

              Button button = new Button("Test");
              button.setId("mybutton");
              toolbar.getItems().add(button);

              //borderPane.setCenter(button);
              borderPane.setTop(toolbar);
              System.out.println("MyButton = " + borderPane.lookupAll("#mybutton"));

              Scene scene = new Scene(borderPane, 1024, 768);
              primaryStage.setScene(scene);
              primaryStage.show();
              System.out.println("MyButton = " + borderPane.lookupAll("#mybutton"));};
      }

      When the button is inside a toolbar, the first lookupAll return an empty set.
      The second lookup work.

      When the button is directly in the border pane, all lookup work.

            miflemi Mick Fleming
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: