Skip to content

Instantly share code, notes, and snippets.

@acyuta
Forked from skrb/Test.java
Created January 31, 2014 06:30
Show Gist options
  • Save acyuta/8727483 to your computer and use it in GitHub Desktop.
Save acyuta/8727483 to your computer and use it in GitHub Desktop.
import java.io.IOException;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
public class Test extends Application {
@Override
public void start(Stage stage) throws Exception {
StackPane root = new StackPane();
WebView view = new WebView();
WebEngine engine = view.getEngine();
engine.load("http://localhost:8080/");
root.getChildren().add(view);
Scene scene = new Scene(root, 800, 600);
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) throws IOException {
Application.launch(args);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment