我正在弄一個小小的JFrame,但它不會找到WindowAdapter,所以我輸入它。找不到符號WindowAdapter雖然導入
import java.awt.event.*; //WindowAdapter should be within this...
import javax.swing.*;
public class Test extends JFrame{
public Test(){
setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
addWindowListener(new WindowAdatper() {
public void windowClosing(WindowEvent e) {
System.out.println("EXIT!!!!");
}
});
}
public static void main(String args[]){
new Test();
}
}
WindowAdatper!= WindowAdapter的 – nachokk
你可以發佈你所得到的錯誤? – fvrghl