Javafx 2.0中的自定义标题栏? [英] Custom title bar in Javafx 2.0?
问题描述
有没有关于如何在javafx 2.0中创建自定义标题栏的教程?我正在创建一个桌面GUI应用程序,并且希望有一个黑色渐变标题栏,该栏带有用于最小化和关闭的自定义按钮. 此处是WPF的教程.我正在为javafx寻找类似的东西
Is there any tutorial on how to create custom title bar in javafx 2.0? I am creating a desktop GUI app and want to have a black gradient title bar with custom buttons for minimizing and closing. Here is the tutorial for WPF. I am looking for something similar for javafx
推荐答案
隐藏平台窗口:
stage.initStyle(StageStyle.UNDECORATED);
现在,您可以创建自己的标题栏/窗口按钮&设置样式.
Now you can create your own titlebar/window-buttons & style them.
最后,检查Oracle JavaFX示例中的合奏",它们已经完成了正确的操作: http://www.oracle.com/technetwork/java/javafx/samples /index.html
Finally, check "Ensemble" from Oracle JavaFX samples, they've done the exact thing: http://www.oracle.com/technetwork/java/javafx/samples/index.html
这篇关于Javafx 2.0中的自定义标题栏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!