移动javafx应用程序阶段标题文本的位置 [英] Move position of javafx application stage title text

查看:184
本文介绍了移动javafx应用程序阶段标题文本的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的JavaFX应用程序在Windows和OSX之间看起来比我想要的更加不同,因为mac上的标题文本居中,但在Windows上它左对齐。理想情况下,我希望两者都集中。
比较OSX
http://i.imgur.com/48YGy5D.png Windows

http://i.imgur。 com / alvWo2n.png

My JavaFX applications look even more different between Windows and OSX than I'd like, as the title text on the mac is centered, but on Windows its left aligned. Ideally I want to make both centered. Compare OSX http://i.imgur.com/48YGy5D.png with Windows: http://i.imgur.com/alvWo2n.png

当然,我想知道是否有人找到了解决此默认设置的方法?

Of course, I'd like to know if anyone has found a way to get around this default?

非常感谢,

推荐答案

我找到的最好方法是制作一个未修饰的窗口并将我自己的标题栏添加到框架的顶部,这样我就可以完全控制所有内容,操作系统/平台永远不会干扰布局。

The best way I have found is to make an undecorated window and add my own title bar to the top of the frame, this way I have full control over everything and the OS/platform will never interfere with the layout.

有关您可以执行此操作的更多信息,请参阅此处:
如何在jFrame上使用关闭按钮创建自定义标题栏?

See here for more info on one way you could do this: How to create customize title bar with close button on jFrame?

这篇关于移动javafx应用程序阶段标题文本的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆