| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 466 人关注过本帖
标题:此程序为何不能运行呢
只看楼主 加入收藏
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
快速回复:此程序为何不能运行呢
数据加载中...
 
   



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

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