资源描述:
《java awt reference外语英文电子书》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、PrefaceTheAbstractWindowTookit(AWT)providestheuserinterfaceforJavaprograms.UnlessyouwanttoconstructyourownGUIoruseacrudetext-onlyinterface,theAWTprovidesthetoolsyouwillusetocommunicatewiththeuser.AlthoughwearebeginningtoseesomeotherAPIsforbuildinguse
2、rinterfaces,likeNetscapesIFC(InternetFoundationClasses),thosealternativeAPIswillnotbeinwidespreaduseforsometime,andsomewillbeplatformspecific.Likewise,wearebeginningtoseeautomatedtoolsforbuildingGUIsinJava;SunsJavaBeanseffortpromisestomakesuchtoolsmuc
3、hmorewidespread.(Infact,thebiggestchangesinJava1.1preparethewayforusingthevariousAWTcomponentsasJavaBeans.)How-ever,evenwithautomatedtoolsandJavaBeansinthefuture,anin-depthknowl-edgeofAWTisessentialforthepracticingJavaprogrammer.Themajorproblemfacing
4、JavadevelopersthesedaysisthatAWTisamovingtar-get.Java1.0.2isbeingreplacedbyJava1.1,withmanysignificantnewfeatures.Java1.1wasreleasedonFebruary18,1997,butitisntclearhowlongitwilltakefor1.1tobeacceptedinthemarket.Theproblemfacingdevelopersisnotjustlearn
5、ingaboutthenewfeaturesandchangesinJava1.1,butalsoknowingwhentheycanaffordtousethesenewfeaturesintheircode.Inpractice,thisboilsdowntoonequestion:whenwillNetscapeNavigatorsupportJava1.1?Rumorhasitthattheanswerisassoonaspossibleandweallhopethisrumorisco
6、rrect.Butgiventherealitiesofmaintainingaverycomplexpieceofsoftware,andthefactthatNetscapeiscurrentlyinthebetaprocessforNavigator4.0,theresapossibilitythatassoonaspossibleandsoonarentthesamething.Inotherwords,youshouldexpectJava1.0.2tostickaroundforaw
7、hile,especiallysinceWebuserswontallreplacetheirbrowsersassoonasNavigatorhas1.1support.xv10July200222:16xviPREFACEThisstateofaffairsraisesobviousproblemsformybook.NothingwouldhavemademehappierthantowriteabookthatcoveredAWT1.1only.Itwouldbesig-nificantl
8、yshorter,foronething,andIwouldnthavetospendsomucheffortpointingoutwhichfeaturesarepresentinwhichrelease.Butthatsnotthecurrentreality.Forthetimebeing,programmersstillneedtoknowabout1.0.2.Therefore,thisbookcoversbothreleasesthoroughly.Therearemanyexamp