问题描述
使用jTattoo LookAndFeel后,
after using jTattoo LookAndFeel,
try {
UIManager.setLookAndFeel(new McWinLookAndFeel());
new Main(new UserModel()).setVisible(true);
} catch (UnsupportedLookAndFeelException ex) {
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null,ex);
}
}
我仍想让所有的帧都未修饰。试图使用
i still want to make all the frames undecorated.i tried to use
this.undecorated(true);
但这些代码无法正常工作,因为外观会覆盖这些代码,任何人都可以告诉我如何超越这个?
任何帮助都会非常适合。
in constructor of my frame but these codes won't work since the look and feel overrides these codes, can anyone tell me how to go above this??any help would be much appriciated.
推荐答案
我遇到了同样的问题,因为这个API记录不够可能很难弄清楚如何解决这个问题。
I had the same problem and because this API is not enough documented it may be difficult to figure out how to solve this.
问题来了,因为主题覆盖了标准的应用程序栏,因此主题也必须隐藏它。我花了几分钟查看类代码,然后找到了这个解决方案。如果要进入全屏模式,设置外观后,首先必须删除边框。所以在设置之前:
The problem comes because the theme overides the standard application bar so the theme has to hide it too. I spent few minutes looking through classes code and I found out this solution. After you set the look and feel if you want to go in fullscreen mode, first you have to remove the border. So before setting:
this.undecorated(true);
删除边框:
DecorationHelper.decorateWindows(false);
PS在离开全屏之前你必须重新装修窗口:
P.S before leaving fullscreen you have to redecorate the window:
DecorationHelper.decorateWindows(true);
它对我有用!
这篇关于安装jTattoo主题后如何使框架未修饰的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!