给 Java 桌面应用程序换肤?

发布于 2024-08-21 09:38:35 字数 78 浏览 5 评论 0原文

有谁知道一种“皮肤”Java 桌面应用程序的方法吗? (例如 Winamp 皮肤或 MirandaIM 皮肤)? 我不想创造自己的外观和感觉。

Does anybody know a way to "skin" Java desktop applications. (Like Winamp skins, or skins for MirandaIM)?
I don't want to create my own look and feel.

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

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

发布评论

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

评论(5

眼眸里的快感 2024-08-28 09:38:35

是的,有几种方法可以做到这一点,但我不知道有谁是真正简单的。看看 Nimbus:Swing 的新面貌,它包含一些示例。您通常可以覆盖组件的外观或仅更改颜色。

一些链接:

并且您可以随时更改为另一个 LaF,例如 物质

Yes, there are a few ways this can be done, but I don't know anyone that is really simple. Have a look at Nimbus: The New Face of Swing, it contains a few examples. You can often override the look of components or just change the colors.

Some links:

And you can always change to another LaF, in example Substance.

狠疯拽 2024-08-28 09:38:35

我们已成功使用 NimROD 外观 为 Swing 外观“换肤” ;感觉。它运行良好,已经为其编写了几个“主题”,并且可以通过几行代码添加。

We've successfully used the NimROD Look and Feel to 'skin' the Swing look & feel. It works well, has several 'themes' already written for it, and can be added in a few lines of code.

莫相离 2024-08-28 09:38:35

对于 2022 年仍在积极维护并允许 Swing 应用程序换肤的项目,请尝试 FlatLaf

FlatLaf 是 Java 的现代开源跨平台外观和感觉
Swing 桌面应用程序。

它看起来几乎平坦(没有阴影或渐变)、干净、简单且
优雅的。 FlatLaf 带有 Light、Dark、IntelliJ 和 Darcula 主题,
可在 HiDPI 显示器上缩放并在 Java 8 或更高版本上运行。

外观深受 Darcula 和 IntelliJ 主题的启发
IntelliJ IDEA 2019.2+ 并使用几乎相同的颜色和图标。

For a project that's still actively maintained in 2022 and allows skinning of Swing applications try FlatLaf

FlatLaf is a modern open-source cross-platform Look and Feel for Java
Swing desktop applications.

It looks almost flat (no shadows or gradients), clean, simple and
elegant. FlatLaf comes with Light, Dark, IntelliJ and Darcula themes,
scales on HiDPI displays and runs on Java 8 or newer.

The look is heavily inspired by Darcula and IntelliJ themes from
IntelliJ IDEA 2019.2+ and uses almost the same colors and icons.

叹梦 2024-08-28 09:38:35

Swing 具有内置的动态外观支持。如果您正在谈论桌面应用程序,您可能需要从课程:修改外观开始和感觉

编辑:如果您谈论的是 Web 应用程序,那么绝对使用不同的 .css 来实现可换肤界面。 CSS Zen Garden 是一个很好的示例/教程,说明同一页面如何使用不同的 .css 文件。

Swing has built-in dynamic look and feel support. If you are talking about desktop apps, you might want to start with Lesson: Modifying the Look and Feel.

Edit: If you are talking about a webapp, then absolutely use different .css to acheive a skinnable interface. CSS Zen Garden is a great example/tutorial on how the same page can look entirely different with a different .css file.

岛歌少女 2024-08-28 09:38:35

2022 年维护的另一个现代外观和感觉是 https://github.com/vincenzopalazzo/material- ui-swing

它还包括一种在外部 jar 中开发自定义主题的方法,例如这个 https://github.com/material-ui-swing/DarkStackOverflowTheme

Another modern look and feel active maintained in 2022 is https://github.com/vincenzopalazzo/material-ui-swing

It include also a way to develop a custom theme in an external jar, like this one https://github.com/material-ui-swing/DarkStackOverflowTheme

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