Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.control.ScrollPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
public class Main extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage primaryStage) {
primaryStage.setWidth(400);
primaryStage.setHeight(400);
primaryStage.setTitle("TITLE");
primaryStage.setResizable(false);
WebView view = new WebView();
WebEngine engine = view.getEngine();
Scene scene = new Scene(new Group());
engine.load("http://yes-no-more-javafx.com");
scene.setRoot(view);
primaryStage.setScene(scene);
primaryStage.show();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment