有没有办法让 Nimbus Look&Feel 为顶级 JFrame
渲染自己的窗口装饰?我一直在互联网上挖掘,我开始怀疑这可能根本不可能。有没有人真正成功(并关心)这一点?
Nimbus 装饰对于内部框架来说非常漂亮和整洁,但显然没有办法对 JFrame
和 JDialog 产生相同的效果
。
我尝试了 nimbusx (Nimbus Extensions),一个子类 的库JFrame
和 JDialog
并据称对它们应用 nimbus 风格的装饰(然后你只需实例化 nimbusx 类而不是 JFrame
和JDialog
);但它实际上不起作用,并且自 2009 年以来一直处于不活跃的 alpha 阶段。
那么,是否有人通过让 Nimbus LAF 处理窗口装饰而成功地使他们的 Nimbus 风格的 Java 应用程序在所有平台上看起来一致?
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 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.
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.
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?
发布评论
评论(1)
我过去曾使用 JGoodies Looks 完成此操作。不知道 Nimbus 是否支持。
然而,它不仅仅是 LAF,它是您必须以编程方式为 JFrame(如果需要,还可以为 JDialog)打开的选项。
请参阅 API 文档
I've done this with JGoodies Looks in the past. I don't know if Nimbus supports it or not.
It's not only the LAF, however, it is an option you must programmatically turn on for JFrame (and JDialog if you want).
See the API Docs