次练君南风捏脸:请教大家一个java程序

来源:百度文库 编辑:杭州交通信息网 时间:2024/04/25 11:39: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);
}
}
编译说有错 站不到什么symbol等等 我不懂 请高手看一下

handEvent 我在api里没找到这个方法,应该是handleEvent()吧

你前面没做事件处理吧