标题:此程序为何不能运行呢
只看楼主
wlz93004
Rank: 1
等 级:新手上路
帖 子:20
专家分:0
注 册:2006-2-8
 问题点数:0 回复次数:1 
此程序为何不能运行呢

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);
}
}

搜索更多相关主题的帖子: 运行 
2006-03-05 17:06
飘飘叶子
Rank: 7Rank: 7Rank: 7
等 级:贵宾
威 望:34
帖 子:597
专家分:10
注 册:2005-8-17
得分:0 
ApplctFrame 类的构造函数多了一个;,去掉就可以了

向着软件工程师的目标前进!
2006-03-05 18:12



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-48555-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.023133 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved