当前位置: 技术问答>java相关
怎样使一个frame的关闭按钮灰掉?
来源: 互联网 发布时间:2015-06-22
本文导语: 就是使右上角的那个叉灰掉。。thx | Sorry,看错了 把叉去掉我不太清楚不过我可以让他失效 protected void processWindowEvent(WindowEvent e) { //super.processWindowEvent(e); if (e.getID()...
就是使右上角的那个叉灰掉。。thx
|
Sorry,看错了
把叉去掉我不太清楚不过我可以让他失效
protected void processWindowEvent(WindowEvent e) {
//super.processWindowEvent(e);
if (e.getID() == WindowEvent.WINDOW_CLOSING) {
System.out.println("Closed");
}
if (e.getID() == WindowEvent.WINDOW_OPENED){
}
}
把叉去掉我不太清楚不过我可以让他失效
protected void processWindowEvent(WindowEvent e) {
//super.processWindowEvent(e);
if (e.getID() == WindowEvent.WINDOW_CLOSING) {
System.out.println("Closed");
}
if (e.getID() == WindowEvent.WINDOW_OPENED){
}
}
|
JWindow与JFrame,JDialog有很大的差距。如果还需要标题栏,能这样就满足了。用JWindow它无法瓜到窗口的任务栏中。。。。。