下载的安装包打不开:请教大家一个JAVA程序

来源:百度文库 编辑:杭州交通信息网 时间:2024/05/04 16:47:28
import java.awt.*;
public class GraphicsApplctInOut
{
public static void main(String args[])
{
ApplctFrame MyFrame=new ApplctFrame();
}
}
class ApplctFrame extends Frame
{
Label prompt;
TextField input;
Label output;
ApplctFrame()
{
super("Application Graphics Frame");
setLayout(new FlowLayout());
prompt=new Label("Enter a character please:");
input=new TextField(4);
output=new Label(" ");
add(prompt);
add(input);
add(output);
pack();
show();
}
public boolean action(Event e)
{
if(e.id==Event.WINDOW_DESTROY)
System.exit(0);
return super.handEvent(e);
}
}
编译时他说在第31行:can't find symbol
symbol :menthod handEvent(java.awt.Event)
location: class java.awt..Frame
return super.hanEvent(e);
^

return super.handEvent(e);

没有handEvent()方法啊,我在API里没找到,哪个包的?