<html><!--This panel generated from the developerWorks XML tag set for tutorials, Version 1.8.9. (C) Copyright 2000 IBM Corporation. All rights reserved.--><head><title>使用 KJava 事件处理的开发</title><style type="text/css"><!--
body { color: #000000; background-color: #ffffff; }
dt { font-weight: bold; }
code { font-family: Courier, monospace; font-size: +2; }
titleCode { font-family: Courier, monospace; font-size: +4; }
ol.alpha { list-style-type: upper-alpha; }
span.center { text-align: center; }
span.right { text-align: right; }
span.constant { color: #990099; }
span.keyword { color: #993333; }
span.function-name { color: #666633; }
span.comment { color: #666666; }
span.string { color: #0000ff; }
span.variable-name { color: #000066; }
span.type { color: #006600; }
span.spacer { font-size: 1pt; }
--></style><meta http-equiv="content-Type" content="text/html; charset=gb2312">
<meta name="dWCategory" content="education_html">
<meta name="zone" content="Java">
</head><body bgcolor="ffffff"><script language="javascript"><!--
var emailAbstract="在本教程中,您将要使用 Java 2 平台,Micro 版 (Java 2 Platform, Micro Edition, J2ME) -- Sun Microsystem 的 Java 2 平台最新版本为手持计算机开发一个基本绘图应用程序。我们将首先说明 J2ME 的背景,研究 J2ME 配置和简表,然后指导您建立自己的开发环境。 接着,我们将研究 K 虚拟机 GUI 开发,使用连接限制设备配置 (Connected Limited Device Configuration, CLDC) API 开发一个基本绘图应用程序。我们还将讨论移动信息设备简表 (Mobile Information Device, MIDP) 用户界面开发,这种开发也要用到 CLDC。最后,我们将简单讨论一下连接设备配置 (Connected Device Configuration, CDC),但我们不开发一个简单的应用程序,因为 CDC 主要面向大型设备。";
var justTitle="J2ME:循序渐进";
var tutorialPrereqs="http://www-106.ibm.com/developerworks/education/r-j2me.shtml";
var menu1blurb="教程提示";
var menu2blurb="J2ME 概述";
var menu3blurb="开发 J2ME 应用程序";
var menu4blurb="J2ME 配置";
var menu5blurb="J2ME 简表";
var menu6blurb="设置您的开发环境";
var menu7blurb="CLDC API";
var menu8blurb="使用 KJava GUI 组件的开发";
var menu9blurb="使用 KJava 事件处理的开发";
var menu10blurb="MIDP API";
var menu11blurb="CDC API";
var menu12blurb="总结";
var browser = "x";
if (navigator.userAgent.indexOf("Mozilla/4") != -1) browser = "N3";
else if (navigator.userAgent.indexOf("Mozilla/3") != -1) browser = "N3";
else browser = "x";
if (browser=="N3")
{
var menu1over=new Image(108,68);
var menu1out=new Image(108,68);
var menu2over=new Image(108,68);
var menu2out=new Image(108,68);
var menu3over=new Image(108,68);
var menu3out=new Image(108,68);
var menu4over=new Image(108,68);
var menu4out=new Image(108,68);
var menu5over=new Image(108,68);
var menu5out=new Image(108,68);
var menu6over=new Image(108,68);
var menu6out=new Image(108,68);
var menu7over=new Image(108,68);
var menu7out=new Image(108,68);
var menu8over=new Image(108,68);
var menu8out=new Image(108,68);
var menu9over=new Image(108,68);
var menu9out=new Image(108,68);
var menu10over=new Image(108,68);
var menu10out=new Image(108,68);
var menu11over=new Image(108,68);
var menu11out=new Image(108,68);
var menu12over=new Image(108,68);
var menu12out=new Image(108,68);
var topmainover=new Image(77,15);
var topmainout=new Image(77,15);
var bottommainover=new Image(77,15);
var bottommainout=new Image(77,15);
var topsectionover=new Image(98,15);
var topsectionout=new Image(98,15);
var bottomsectionover=new Image(98,15);
var bottomsectionout=new Image(98,15);
var topfeedbackover=new Image(80,15);
var topfeedbackout=new Image(80,15);
var bottomfeedbackover=new Image(80,15);
var bottomfeedbackout=new Image(80,15);
var toppreviousover=new Image(77,15);
var toppreviousout=new Image(77,15);
var bottompreviousover=new Image(77,15);
var bottompreviousout=new Image(77,15);
var topnextover=new Image(60,15);
var topnextout=new Image(60,15);
var bottomnextover=new Image(60,15);
var bottomnextout=new Image(60,15);
var topnextsectionover=new Image(108,15);
var topnextsectionout=new Image(108,15);
var bottomnextsectionover=new Image(108,15);
var bottomnextsectionout=new Image(108,15);
menu1over.src="imagemaster/himenu1.jpg";
menu1out.src="imagemaster/menu1.jpg";
menu2over.src="imagemaster/himenu2.jpg";
menu2out.src="imagemaster/menu2.jpg";
menu3over.src="imagemaster/himenu3.jpg";
menu3out.src="imagemaster/menu3.jpg";
menu4over.src="imagemaster/himenu4.jpg";
menu4out.src="imagemaster/menu4.jpg";
menu5over.src="imagemaster/himenu5.jpg";
menu5out.src="imagemaster/menu5.jpg";
menu6over.src="imagemaster/himenu6.jpg";
menu6out.src="imagemaster/menu6.jpg";
menu7over.src="imagemaster/himenu7.jpg";
menu7out.src="imagemaster/menu7.jpg";
menu8over.src="imagemaster/himenu8.jpg";
menu8out.src="imagemaster/menu8.jpg";
menu9over.src="imagemaster/himenu9.jpg";
menu9out.src="imagemaster/menu9.jpg";
menu10over.src="imagemaster/himenu10.jpg";
menu10out.src="imagemaster/menu10.jpg";
menu11over.src="imagemaster/himenu11.jpg";
menu11out.src="imagemaster/menu11.jpg";
menu12over.src="imagemaster/himenu12.jpg";
menu12out.src="imagemaster/menu12.jpg";
var mainblurb="主菜单";
var sectionblurb="章节菜单";
var feedbackblurb="给出此教程的反馈意见";
var previousblurb="上一屏";
var nextblurb="下一屏";
var nextsectionblurb="下一章";
topmainover.src="../i/h-main.gif";
topmainout.src="../i/main.gif";
bottommainover.src="../i/h-main.gif";
bottommainout.src="../i/main.gif";
topsectionover.src="../i/h-section.gif";
topsectionout.src="../i/section.gif";
bottomsectionover.src="../i/h-section.gif";
bottomsectionout.src="../i/section.gif";
topfeedbackover.src="../i/h-feedback.gif";
topfeedbackout.src="../i/feedback.gif";
bottomfeedbackover.src="../i/h-feedback.gif";
bottomfeedbackout.src="../i/feedback.gif";
toppreviousover.src="../i/h-previous.gif";
toppreviousout.src="../i/previous.gif";
bottompreviousover.src="../i/h-previous.gif";
bottompreviousout.src="../i/previous.gif";
topnextover.src="../i/h-next.gif";
topnextout.src="../i/next.gif";
bottomnextover.src="../i/h-next.gif";
bottomnextout.src="../i/next.gif";
topnextsectionout.src="../i/nextsection.gif";
topnextsectionover.src="../i/h-nextsection.gif";
bottomnextsectionout.src="../i/nextsection.gif";
bottomnextsectionover.src="../i/h-nextsection.gif";
}
function iOut(image)
{
if (browser=="N3")document[image].src=eval(image + "out.src");
}
function iOver(image)
{
if (browser=="N3")document[image].src=eval(image + "over.src");
}
// --></script><a href="#navskip"><img border="0" alt="跳至主目录" src="../i/c.gif" width="1" height="1"></a><!--#include virtual="/developerWorks/inc/tuto-inc/tuto-header.inc" --><!--#include virtual="/developerWorks/inc/tuto-inc/tuto-java-header.inc" --><br x="7"><img src="imagemaster/masthead.jpg" alt="J2ME:循序渐进" width="500" height="40"></td>
<td width="*" valign="bottom" align="right"><a border="0" href="../tutorial.zip"><img alt="下载教程 zip 文件" border="0" src="../i/icon-zip.gif" width="38" height="26"></a><a href=../tutorial_eng/index.shtml target=_blank><img alt="英文