Is there a way to have the Nimbus Lookamp;Feel render its own windows decorations for a top level JFrame?(有没有办法让 Nimbus LookFeel 为顶级 JFrame 渲染自己的窗户装饰?)
问题描述
有没有办法让 Nimbus Look&Feel 为顶级 JFrame
渲染自己的窗口装饰?我一直在互联网上挖掘,我开始怀疑这可能根本不可能.有没有人真正成功(并关心)这个?
Is there a way to have the Nimbus Look&Feel render its own windows decorations for a top level JFrame
? I've been digging through the Internet, and I'm starting to suspect it might not be possible at all. Has anyone actually succeeded with (and cared about) that?
Nimbus 装饰对于 内部框架 来说是漂亮而整洁的,但是显然没有办法对 JFrame
和 JDialog
s.
Nimbus decorations are nice and neat for internal frames, but apparently there is no way to have the same effect on JFrame
s and JDialog
s.
我尝试了 nimbusx(Nimbus Extensions),一个子类化的库JFrame
和 JDialog
并据称将 nimbus 样式的装饰应用于它们(然后您只需实例化 nimbusx 类而不是 JFrame
和 JDialog
);但它实际上不起作用,并且自 2009 年以来一直处于非活跃的 alpha 阶段.
I tried nimbusx (Nimbus Extensions), a library that subclasses JFrame
and JDialog
and allegedly applies nimbus-styled decorations to them (then you just have to instantiate nimbusx classes instead of JFrame
and JDialog
); but it actually doesn't work, and it's been in an inactive alpha stage since 2009.
那么,有没有人通过让 Nimbus LAF 处理窗口装饰,成功地让他们的 nimbus 风格的 Java 应用程序在所有平台上看起来都保持一致?
So, did anyone succeeded in having their nimbus-styled Java application look consistent on all platforms by having the Nimbus LAF take care of window decorations?
推荐答案
我已经用 JGoodies Looks 过去.我不知道 Nimbus 是否支持.
I've done this with JGoodies Looks in the past. I don't know if Nimbus supports it or not.
它不仅是 LAF,而且是您必须以编程方式为 JFrame(和 JDialog,如果需要)打开的选项.
It's not only the LAF, however, it is an option you must programmatically turn on for JFrame (and JDialog if you want).
JFrame.setDefaultLookAndFeelDecorated( true );
JDialog.setDefaultLookAndFeelDecorated( true );
请参阅 API 文档
这篇关于有没有办法让 Nimbus Look&Feel 为顶级 JFrame 渲染自己的窗户装饰?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:有没有办法让 Nimbus Look&Feel 为顶级 JFrame 渲染自己的窗户装饰?


基础教程推荐
- Java 中保存最后 N 个元素的大小受限队列 2022-01-01
- Spring Boot Freemarker从2.2.0升级失败 2022-01-01
- 首次使用 Hadoop,MapReduce Job 不运行 Reduce Phase 2022-01-01
- 如何在不安装整个 WTP 包的情况下将 Tomcat 8 添加到 Eclipse Kepler 2022-01-01
- 由于对所需库 rt.jar 的限制,对类的访问限制? 2022-01-01
- 如何使用 Eclipse 检查调试符号状态? 2022-01-01
- 如何使用 Stream 在集合中拆分奇数和偶数以及两者的总和 2022-01-01
- 在螺旋中写一个字符串 2022-01-01
- 如何强制对超级方法进行多态调用? 2022-01-01
- 如何对 HashSet 进行排序? 2022-01-01