Bic*_*ick 7 java swing
有没有办法隐藏秋千应用程序中的关闭按钮?
我知道我可以设置,JFrame.DO_NOTHING_ON_CLOSE但有没有办法完全消除它?
JFrame.DO_NOTHING_ON_CLOSE
如果我写,setUndecorated(true)我得到 IllegalComponentStateException - the frame is displayable
setUndecorated(true)
IllegalComponentStateException - the frame is displayable
Dhr*_*ola 6
frame.setUndecorated(true)在已经显示帧的同时使用会导致错误,因为API中不允许这样做.相反,frame.setUndecorated(true)在设置之前使用frame.setVisible(true).这应该可以解决您的错误:
frame.setUndecorated(true)
frame.setVisible(true)
IllegalComponentStateException - 框架可显示
如果成功,将隐藏关闭按钮.
归档时间:
14 年,6 月 前
查看次数:
2012 次
最近记录: