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 和 JDialogs.
Nimbus decorations are nice and neat for internal frames, but apparently there is no way to have the same effect on JFrames and JDialogs.
我尝试了 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 渲染自己的窗户装饰?
基础教程推荐
- 将 Windows 证书导入 Java 2022-01-01
- 控制台应用程序中的 Java 键盘输入解析 2022-01-01
- 将 double 转换为 Int,向下舍入 2022-01-01
- JPA惰性列表上的流 2022-01-01
- doFilter()是在servlet的工作完成之前还是之后执行的? 2022-01-01
- 在springboot中如何给mybatis加拦截器 2023-04-29
- 如何在相机中应用自定义滤镜 [Surfaceview 预览]. 2022-01-01
- 在java中使用xpath和selenium解析HTML表格数据 2022-01-01
- Maven:无效的目标版本:10 2022-01-01
- Java ECDSAwithSHA256 签名长度不一致 2022-01-01
