Created
April 3, 2014 14:21
-
-
Save coudy/9955259 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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