The method wiodowClosing() from the type new WindowAdapter(){} is never used locally java的错误信息使用注解方式虽然可以清除警告,但是关闭窗口的命令无法实现,也就是自己public void WindowClosing(WindowEvent we) 的方

来源:学生作业帮助网 编辑:作业帮 时间:2024/07/12 05:13:46
The method wiodowClosing() from the type new WindowAdapter(){} is never used locally java的错误信息使用注解方式虽然可以清除警告,但是关闭窗口的命令无法实现,也就是自己public void WindowClosing(WindowEvent we) 的方
xRnAO]Bbl`4`;šegi&jRܒ*$톟D}5&Lν9޸xB %c [lj2/tț[*sY%HwlD c (x*x ?M 8dr^;ěve6ox~q?Q~hZ9o84?{~NmVoa~GGR^끖PMŲ DkYBa k{ 2*]O~4~)}dz^ 05AF]ZXϾ]}z Nm2: I|Rp_QizI歐Ȯ]zФe:qWV%DEgѺh1

The method wiodowClosing() from the type new WindowAdapter(){} is never used locally java的错误信息使用注解方式虽然可以清除警告,但是关闭窗口的命令无法实现,也就是自己public void WindowClosing(WindowEvent we) 的方
The method wiodowClosing() from the type new WindowAdapter(){} is never used locally java的错误信息
使用注解方式虽然可以清除警告,但是关闭窗口的命令无法实现,也就是自己public void WindowClosing(WindowEvent we) 的方法不能用到.

The method wiodowClosing() from the type new WindowAdapter(){} is never used locally java的错误信息使用注解方式虽然可以清除警告,但是关闭窗口的命令无法实现,也就是自己public void WindowClosing(WindowEvent we) 的方
提示的意思是你这个函数没有在这个程序中北调用过,你按照下面这格式添加响应事件,我测试过了.CloseFrameDemo 就是你创建的那个药关闭的窗体的类名.
public CloseFrameDemo() {
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent arg0) {
JOptionPane.showMessageDialog(null,"正在关闭!");
}
});