此程序为何不能运行呢
import java.awt.*;
public class pic
{
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("请输入字符");
input=new TextField(4);
output=new Label(" ");
add(prompt);
add(input);
add(output);
pack();
show();
}
public boolean action(Event e,Object o)
{
output.setText("请输入字符"+o.toString());
return true;
}
public boolean handleEvent(Event e)
{
if (e.id==Event.WINDOW_DESTROY)
System.exit(0);
return super.handleEvent(e);
}
}