Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Java SE 综合讨论区  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 XXX should be declared abstract; it does not define windowOpened
q_yuan





发贴: 174
积分: 3
于 2004-11-04 10:15 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
高手帮我看一看这个程序!

{ 提问前请搜寻一下旧帖子
请尽量用准确的文字描述作为标题 }


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
这是个定义要怎么添加?谢谢!


why edited on 2004-11-04 10:30


25了才开始学JAVA晚吗?

话题树型展开
人气 标题 作者 字数 发贴时间
9239 XXX should be declared abstract; it does not define windowOpened q_yuan 1220 2004-11-04 10:15
5324 Re:XXX should be declared abstract; it does not define windowOpened why 61 2004-11-04 10:33
5949 Re:XXX should be declared abstract; it does not define windowOpened q_yuan 8 2004-11-08 16:36

flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   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