Base JavaFX applet size on node size
When embedding JavaFX in javascript, is there a way to base the height and width on the size of the JavaFX stage? So if I were to update the dimensions of my stage, I wouldn't have to edit the javascript as well.
Conversely, is there a way to bind 开发者_如何学编程the dimensions of my stage to the dimensions of the user's browser?
In the JavaScript options is one named show_html
. When setted to true
, the script will show you the HTML. Once you have it, you can apply CSS styles to it and use the HTML instead of the JS.
The solution I came to was to set the applet up like so:
javafx(
{
archive: "myapp.jar",
width: "100%",
height: "100%",
code: "my.app.myapp",
id: "app"
}
);
which worked just fine for filling the screen.
精彩评论