weixin_44376523
weixin_44376523
采纳率0%
2019-11-16 18:41

大神们,求助阿!给窗口注册监听器时出错了,求教怎么办阿?

The method addWindowListener(WindowListener) in the type Window is not applicable for the arguments (new
WindowAdapter(){})
- The method addWindowListener(WindowListener) in the type Window is not applicable for the arguments ()
- WindowAdapter cannot be resolved to a type

 jf.addWindowListener(new WindowAdapter() {
             public void windowClosing(WindowEvent e)
             {
                 System.exit(0);
             }
         });![图片说明](https://img-ask.csdn.net/upload/201911/16/1573900798_564385.png)![图片说明](https://img-ask.csdn.net/upload/201911/16/1573900803_668032.png)![图片说明](https://img-ask.csdn.net/upload/201911/16/1573900807_360040.png)![图片说明](https://img-ask.csdn.net/upload/201911/16/1573900833_76823.png)![图片说明](https://img-ask.csdn.net/upload/201911/16/1573900840_738742.png)


        是我的java版本太低了m





  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答

为你推荐