| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 610 人关注过本帖
标题:[讨论]这个程序怪哦!
只看楼主 加入收藏
softwarelan
Rank: 1
等 级:新手上路
帖 子:209
专家分:0
注 册:2005-6-1
收藏
 问题点数:0 回复次数:2 
[讨论]这个程序怪哦!

这个程序输出什么? /* tButton.java * * Tabbed Focus Classes * Copyright(C) 1996 by Bill Giel * * E-mail: rvdi@usa.nai.net * WWW: http://www.nai.net/~rvdi/home.htm * *************************************************************************** * Abstract * -------- * Overrides Button to provide action if ENTER is pressed when the * tButton object has focus. * *************************************************************************** * THE AUTHOR MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY * OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE, OR NON-INFRINGEMENT. THE AUTHOR SHALL NOT BE LIABLE * FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. ***************************************************************************/

import java.awt.*;

/** Overrides Button to provide action if ENTER is pressed when the * tButton object has focus. */

public class tButton extends Button { static final int ENTER = 10;

/** Construct a tButton object with the supplied label. */ tButton(String label) { super(label); }

/* Provides action by posting an ACTION_EVENT to the parent when * ENTER is pressed and the tButton object has focus. */ public boolean handleEvent(Event e) { switch(e.id){ case Event.KEY_PRESS: switch(e.key){ case ENTER: postEvent(new Event(getParent(),Event.ACTION_EVENT,getLabel())); return true; } } return super.handleEvent(e); } }

搜索更多相关主题的帖子: Copyright blank pressed provide action 
2005-06-08 16:03
softwarelan
Rank: 1
等 级:新手上路
帖 子:209
专家分:0
注 册:2005-6-1
收藏
得分:0 
嗯,谁能回答出来啊?啊?

Not a hero until you reach The Greatwall!
2005-06-08 16:04
林天笑
Rank: 1
等 级:新手上路
帖 子:19
专家分:0
注 册:2005-6-1
收藏
得分:0 
没耐心看下去

我是一个新手,向各位请教 QQ:274077173 Email:lintianxiao_3891@
2005-06-08 16:54
快速回复:[讨论]这个程序怪哦!
数据加载中...
 
   



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

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