Topic: XXX should be declared abstract; it does not define windowOpened |
Print this page |
1.XXX should be declared abstract; it does not define windowOpened | Copy to clipboard |
Posted by: q_yuan Posted on: 2004-11-04 10:15 高手帮我看一看这个程序! { 提问前请搜寻一下旧帖子 请尽量用准确的文字描述作为标题 } import java.awt.*; import java.awt.event.*; public class TestAddListener implements ActionListener,WindowListener{ Frame f; Button b; public void create(){ f=new Frame("测试"); b=new Button("PRESS"); b.addActionListener(this); f.addWindowListener(this); f.add(b,"North"); f.setSize(200,200); f.setVisible(true); } public static void main(String[] args){ TestAddListener ta = new TestAddListener(); ta.create(); } public void actionPerformed(ActionEvent e){ System.out.println("the Button is pressed!"); } public void windowActivated(WindowEvent e){}; public void windowClosed(WindowEvent e){}; public void windowCloseing(WindowEvent e){System.exit(1);}; public void windowDeactivated(WindowEvent e){}; public void windowDeiconfied(WindowEvent e){}; public void windowIconified(WindowEvent e){}; public void windowOpen(WindowEvent e){}; } 在编译这个程序时总是编不过去。提示为: TestAddListener should be declared abstract; it does not define windowOpened(java.awt.event.WindowEvent) in TestAddListener 这是个定义要怎么添加?谢谢! |
2.Re:XXX should be declared abstract; it does not define windowOpened [Re: q_yuan] | Copy to clipboard |
Posted by: why Posted on: 2004-11-04 10:33 public void windowOpened(WindowEvent e){}; |
3.Re:XXX should be declared abstract; it does not define windowOpened [Re: q_yuan] | Copy to clipboard |
Posted by: q_yuan Posted on: 2004-11-08 16:36 谢谢上面的楼主! |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |