// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.TextArea;
import javafx.scene.layout.GridPane;
import javafx.scene.web.WebView;
import javafx.stage.Stage;

public class EmbeddedBrowser extends Application {
    private WebView browser;
    @Override
    public void start(Stage stg) throws Exception {
        stg.setTitle("Embedded browser demo");
        GridPane pn = new GridPane();
        pn.add(new TextArea("\r\n\r\nThis is the top window\r\n\r\n"), 0, 0);
        browser = new WebView();
        browser.getEngine().load("http://www.google.com/");
        pn.add(browser, 0, 1);
        pn.add(new TextArea("\r\n\r\nThis is the bottom window\r\n\r\n"), 0, 2);
        stg.setScene(new Scene(pn));
        stg.show();
    }
    public static void main(String[] args) {
        Application.launch(EmbeddedBrowser.class, args);
    }
}
