Skip to content

Instantly share code, notes, and snippets.

@coudy
Created April 3, 2014 14:21
Show Gist options
  • Save coudy/9955259 to your computer and use it in GitHub Desktop.
Save coudy/9955259 to your computer and use it in GitHub Desktop.
package eu.coudy.fx8;
import javafx.application.Application;
import javafx.geometry.HPos;
import javafx.geometry.VPos;
import javafx.scene.Scene;
import javafx.scene.layout.Region;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
public class OctaneBenchmarkJavaFX8 extends Application {
@Override
public void start(Stage stage) {
Scene scene = new Scene(new Browser(), 900, 900);
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}
class Browser extends Region {
final WebView browser = new WebView();
final WebEngine webEngine = browser.getEngine();
public Browser() {
webEngine.load("http://octane-benchmark.googlecode.com/svn/latest/index.html");
//webEngine.load("http://jsconsole.com/");
getChildren().add(browser);
}
@Override
protected void layoutChildren() {
layoutInArea(browser, 0, 0, getWidth(), getHeight(), 0, HPos.CENTER, VPos.CENTER);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment