安装 jTattoo 主题后如何使框架不装饰
how to make frame undecorated after jTattoo theme installed
使用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);
}
}
我还是想把所有的帧undecorated.i都试过用
this.undecorated(true);
在我的框架的构造函数中,但是这些代码将不起作用,因为外观和感觉会覆盖这些代码,谁能告诉我如何超越这个?
任何帮助将不胜感激。
我遇到了同样的问题,因为这个 API 没有足够的记录,所以可能很难弄清楚如何解决这个问题。
问题来了,因为主题覆盖了标准应用程序栏,所以主题也必须隐藏它。我花了几分钟查看 类 代码并找到了这个解决方案。如果要进入全屏模式,设置外观后,首先必须删除边框。所以设置前:
this.undecorated(true);
删除边框:
DecorationHelper.decorateWindows(false);
P.S 在离开全屏之前你必须重新装饰 window:
DecorationHelper.decorateWindows(true);
对我有用!
使用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);
}
}
我还是想把所有的帧undecorated.i都试过用
this.undecorated(true);
在我的框架的构造函数中,但是这些代码将不起作用,因为外观和感觉会覆盖这些代码,谁能告诉我如何超越这个? 任何帮助将不胜感激。
我遇到了同样的问题,因为这个 API 没有足够的记录,所以可能很难弄清楚如何解决这个问题。
问题来了,因为主题覆盖了标准应用程序栏,所以主题也必须隐藏它。我花了几分钟查看 类 代码并找到了这个解决方案。如果要进入全屏模式,设置外观后,首先必须删除边框。所以设置前:
this.undecorated(true);
删除边框:
DecorationHelper.decorateWindows(false);
P.S 在离开全屏之前你必须重新装饰 window:
DecorationHelper.decorateWindows(true);
对我有用!