javafx.scene.web.WebEngine
This node takes the attributes from the javafx.scene.web.WebEngine class. see javafx.scene.web.WebEngine
This node takes no content.
Creates a WebEngine.
import groovyx.javafx.GroovyFX
import groovyx.javafx.SceneGraphBuilder
def url = "http://www.yahoo.com";
GroovyFX.start({
def sg = new SceneGraphBuilder();
def webEngine = sg.webEngine(location: url);
def goAction = { webEngine.load(urlBox.getText()) };
def stage = sg.stage(
title: "Web Engine (Groovy)",
visible: true,
) {
scene(fill: gray, width: 640, height: 500) {
vbox() {
hbox() {
urlBox = textBox( text: url, action: goAction, prefWidth:400);
button(text: "Go", onAction: goAction)
}
wv = webView(engine: webEngine)
}
}
}
});
|