// package javafx.test;

import javafx.application.Platform;
import javafx.scene.Scene;
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.stage.Stage;

import java.io.IOException;

public class Application extends javafx.application.Application {

    WebView webView = new WebView();
    WebEngine engine = webView.getEngine();

    public static void main(String[] args) {
        launch(args);
    }

    @Override
    public void start(Stage stage) throws IOException {
        engine.loadContent("<body style='background: #000000'>" +
                "<div style='background: #ff0000; border: 1px solid #f5a623; border-radius: 4px; height: 30px; width: 60px;'></div>" +
                "</body>");
        StackPane root = new StackPane();
        root.getChildren().add(webView);
        Scene scene = new Scene(root);
        stage.setTitle("test");
        stage.setScene(scene);
        stage.setOnCloseRequest(windowEvent -> {
            Platform.exit();
        });
        stage.show();
    }
}