这个问题有点怪。 不会啊我在jcreator里运行蛮好啊看不出什么 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 class ExitWindow extends WindowAdapter { public void WindwClosing(WindowEvent e) { System.exit(0); }}改成内部类 class ExitWindow extends WindowAdapter { public void WindowClosing(WindowEvent e) { System.exit(0); }} windowClosing,注意头字母w是小写的哦~ 现在程序改成这样子了,是把原来的“WindwClosing”改为“windowClosing”/*ExitFrame.java 练习使用Frame,Listener */ import javax.swing.JFrame;import java.awt.event.*;class ExitWindow extends WindowAdapter { public void windowClosing(WindowEvent e) { System.exit(0); }}public class ExitFrame extends JFrame { public ExitFrame() { super("Frame Title"); setSize(300, 100); ExitWindow exit = new ExitWindow(); addWindowListener(exit); setVisible(true); }//Constructor public static void main(String[] args) { ExitFrame sf = new ExitFrame(); }//end main}现在编译运行都没问题了。但我想练习一下使用内部类,大侠帮忙改一下好吗?谢拉! java HashSet 用法 又是一道继承题 连接DB2数据库报错 oracle中的视图问题? 想来日本工作的话,请联系 按编译原理的思路设计的一个计算器 main中的参数可以随便写吗? 在JBuilder中,JdbRadioButton组的某一个选中状态如何与值域的对应? 哪里有jbuilder8.0企业版(非测试版(100多兆))? 本人刚学JAVA,非常幼稚的问题,劳烦各位大侠进来看一看,多谢了,小的在线等候中…… 什么是序列化 都说我写的程序不规范,谁有中文的“Java Code Conventions”
public void WindwClosing(WindowEvent e) {
System.exit(0);
}
}
改成内部类
public void WindowClosing(WindowEvent e) {
System.exit(0);
}
}
练习使用Frame,Listener
*/
import javax.swing.JFrame;
import java.awt.event.*;class ExitWindow extends WindowAdapter {
public void windowClosing(WindowEvent e) {
System.exit(0);
}
}public class ExitFrame extends JFrame {
public ExitFrame() {
super("Frame Title");
setSize(300, 100);
ExitWindow exit = new ExitWindow();
addWindowListener(exit);
setVisible(true);
}//Constructor
public static void main(String[] args) {
ExitFrame sf = new ExitFrame();
}//end main
}现在编译运行都没问题了。但我想练习一下使用内部类,大侠帮忙改一下好吗?谢拉!