首页 > 编程知识 正文

java怎么调用jframe窗口,eclipse怎么撤销

时间:2023-05-04 04:04:19 阅读:177230 作者:4806

id on ' tgethowcaniemploythiscode :

frame.setdefaultcloseoperation (jframe.exit _ on _ close );

to close the program with the x button。

解决方案

You need the line

frame.setdefaultcloseoperation (window constants.exit _ on _ close );

becausethedefaultbehaviourthejframewhenyoupressthexbuttonistheequivalentto

frame.setdefaultcloseoperation (window constants.hide _ on _ close );

soalmostallthetimesyou ' llneedtoaddthatlinemanuallywhencreatingyourjframe

iamcurrentlyreferringtoconstantsinwindowconstantslikewindowconstants.exit _ on _ closeinsteadofthesameconstantsdeclantsdeclaclantsdcleclantsdeclantsdecleclantsdecleclantsclan

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。