Skip to content

Instantly share code, notes, and snippets.

@sentientmonkey
Created March 28, 2017 22:17
Show Gist options
  • Select an option

  • Save sentientmonkey/b49097e14bd435eaee1629ed6d908a0c to your computer and use it in GitHub Desktop.

Select an option

Save sentientmonkey/b49097e14bd435eaee1629ed6d908a0c to your computer and use it in GitHub Desktop.
package sample;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.stage.Stage;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
public class Main extends Application {
@Override
public void start(Stage primaryStage) throws Exception{
final WebView browser = new WebView();
final WebEngine webEngine = browser.getEngine();
webEngine.load("http://www.google.com");
primaryStage.setTitle("Hello Gooooogle");
Scene scene = new Scene(browser);
primaryStage.setScene(scene);
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment