Revision: 62710
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at March 7, 2013 09:23 by alexedy
Initial Code
package main; 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; /** * * @web http://java-buddy.blogspot.com/ */ public class Request extends Application { /** * @param args the command line arguments */ public static void main(String[] args) { launch(args); } @Override public void start(Stage primaryStage) { primaryStage.setTitle("facebook.com"); WebView myBrowser = new WebView(); WebEngine myWebEngine = myBrowser.getEngine(); myWebEngine.load("https://google.com"); StackPane root = new StackPane(); root.getChildren().add(myBrowser); primaryStage.setScene(new Scene(root, 640, 480)); primaryStage.show(); } }
Initial URL
Initial Description
don't forget to add jfxrt.jar to class path
Initial Title
Basic browser in java fx
Initial Tags
java, browser, simple
Initial Language
Java