I find it when I made irof Advent Calendar entry.

Environment: Windows7(64bit) Java1.7.0_10

AddAll Canvas and GridPane as children of StackPane.(GridPane is top)
Add Buttons, Labels, and TextFields to GridPane, and draw checkered pattern on Canvas.

  public void start(Stage stage) {

    GridPane grid = new GridPane();
    grid.add(new Button("Button1"), 0, 0);
    grid.add(new Button("Button2"), 1, 0);
    grid.add(new Label("Label1"), 0, 1);
    grid.add(new Label("Label2"), 1, 1);
    grid.add(new TextField(), 0, 2);
    grid.add(new TextField("text"), 1, 2);

    Canvas canvas = new Canvas(240, 80);
    GraphicsContext context = canvas.getGraphicsContext2D();
    for(int y = 0; y < 8; y++){
      for(int x = 0; x < 24; x++){
        if((x + y) % 2 == 0){
          context.fillRect(x * 10, y * 10, 10, 10);

    StackPane stack = new StackPane();
    stack.getChildren().addAll(canvas, grid);
    stage.setScene(new Scene(stack));

It become like this.


The first Button is in front of the Canvas, but other Controls are hidden by checkered pattern.

When you change the size of the window, all Controls will be in front of the Canvas.


But, when the mouse cursor is over the Button, or TextField is input mode, other Controls are hidden again.


Apparently if there is a control that has the focus, it seems other controls are hidden by Canvas.