package com.example.component;

import javafx.scene.layout.GridPane;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class MainLayout extends GridPane {

    private InputArea inputArea;

    private OutputArea outputArea;

    @Autowired
    public MainLayout(InputArea inputArea, OutputArea outputArea) {
        this.inputArea = inputArea;
        this.outputArea = outputArea;

        add(new ToolbarLayout(), 0, 0);
        add(this.inputArea, 0, 1);
        add(this.outputArea, 0, 2);
    }

    public void focusToInput() {
        inputArea.requestFocus();
    }

}

@@ -569,16 +569,256 @@
 , 0, 2);
+%0A%0A        this.inputArea.setText(%22javafx.application.Platform.runLater(() -%3E %7B new javafx.scene.control.Alert(javafx.scene.control.Alert.AlertType.WARNING, %5C%22Hello, World!%5C%22, javafx.scene.control.ButtonType.OK).showAndWait(); %7D);%22); // TODO
 %0A    %7D%0A%0A

add sample statement to text field