java 中的外观和感觉

发布于 2024-08-20 16:27:47 字数 146 浏览 4 评论 0原文

我在java中的外观和感觉上做了很多工作,它工作得很好,但唯一的问题是唯一没有改变的组件是标题栏(标题)仍然具有与操作系统相同的本机外观和感觉(以Windows平台为例)

我想知道原因是什么以及如何解决这个问题?任何身体帮助......

提前致谢

I work a lot with look and feel in java and it works well but the only problem that the only component that has no change is the title bar(caption) still have the same native look and feel of os(windows platform as example)

i want to know what's is the reason and how to fix this? any body help..........

thanks in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

恰似旧人归 2024-08-27 16:27:47

查看 Substance https://substance.dev.java.net/ see.html

您可以通过物质支持更改标题栏的外观和感觉。

以下是一些屏幕截图:

alt text

替代文本

Check out Substance https://substance.dev.java.net/see.html

You can change the title bar look and feel with substance support.

Here are a few screenshots:

alt text

alt text

远山浅 2024-08-27 16:27:47

有些 PL&F 支持渲染帧装饰,有些则不支持。我相信 Sun 跨平台 PL&F(例如 Metal)支持它,但特定于平台的 PL&F(例如 Windows)不支持。

默认情况下该功能未开启。要为所有新框架打开它,请使用JFrame.setDefaultLookAndFeelDecolated。该方法的 API 文档展示了如何单独为帧打开它。

Some PL&Fs support rendering frame decorations, and some do not. I believe the Sun cross-platform PL&Fs (for instance Metal) support it, but platfrom-specific PL&F (for instance Windows) do not.

The feature is not on by default. To switch it on for all new frames use JFrame.setDefaultLookAndFeelDecorated. The API docs for the method show how to switch it on for frames individually.

真心难拥有 2024-08-27 16:27:47

如果您想创建自己的无边框窗口,请使用 Window/JWindow,而不是使用 Frame/JFrame。 Frame/JFrame 是 Window/JWindow 的扩展,提供边框以及最大化、最小化和关闭按钮。通常这些小部件由操作系统提供,但您可以覆盖它们。

If you want to create your own borderless window, instead of using a Frame/JFrame use a Window/JWindow. Frame/JFrame are extensions to Window/JWindow that provide borders and the maximize, minimize and close buttons. Usually those widgets are provided by the OS, but you can override them.

葬花如无物 2024-08-27 16:27:47

使用

JFrame.setDefaultLookAndFeelDecorated(true);
JDialog.setDefaultLookAndFeelDecorated(true);

在任何 JFrame 或 JDialog 创建之前 。
通常进入主线。

Use

JFrame.setDefaultLookAndFeelDecorated(true);
JDialog.setDefaultLookAndFeelDecorated(true);

Before any JFrame or JDialog creation.
Usually into main.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文