JavaFX 小程序大小基于节点大小
当在javascript中嵌入JavaFX时,有没有办法根据JavaFX舞台的大小来确定高度和宽度?因此,如果我要更新舞台的尺寸,我也不必编辑 JavaScript。
相反,有没有办法将我的舞台尺寸绑定到用户浏览器的尺寸?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
JavaScript 选项中有一个名为
show_html
。当设置为true
时,脚本将向您显示 HTML。拥有它后,您可以对其应用 CSS 样式,并使用 HTML 而不是 JS。In the JavaScript options is one named
show_html
. When setted totrue
, 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:
which worked just fine for filling the screen.