0% found this document useful (0 votes)
17 views

Java Unit 4 (Event Handling)

The document discusses event handling in graphical user interface (GUI) applications, focusing on the delegation of events and the use of various components like buttons and text fields. It explains how events are generated and handled, including mouse and keyboard actions, and the importance of layout managers in organizing components. Additionally, it touches on the Abstract Window Toolkit (AWT) and its role in creating platform-independent applications.

Uploaded by

Jaya laxmi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
17 views

Java Unit 4 (Event Handling)

The document discusses event handling in graphical user interface (GUI) applications, focusing on the delegation of events and the use of various components like buttons and text fields. It explains how events are generated and handled, including mouse and keyboard actions, and the importance of layout managers in organizing components. Additionally, it touches on the Abstract Window Toolkit (AWT) and its role in creating platform-independent applications.

Uploaded by

Jaya laxmi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 18
FO ak foes can_be afc ok chang taba i © an obfet Gh __behravieus by puupp ming atten i Aetiens con he o Inution elfek , usiantt—yabveariond y key [fase agi tefasond — dh ange —aeselng¢ ean __*_ i wosifous event claswer ora Events a OFrate quound Events d Events, ® i Fosueguound Fuunta i-asie evento that sequfe gen fntesincifen +n Genasinte toot _?s _jouegaound events __ Ee #| Event lax t- TL fa a —mechantam to control tne {i | (Gent hendlin: _etonton) | event a | ahould. ee ra -tvent _Occus ae ue =| to handle “swat java —jlnvas_ deligotton event Saag = Delegation event adel i Eb has Sources _& Ubbensu [+ Sousiges + Cvemba ane gqunasiated from ne 20ustce—. These ose _vasfous _gountces —_[Pke _ button, Ligk » Check boxes sasaea tad fo Button, windowa_, menu ikem, devel baw. ae eee ate Pari sages 8 ees | o Lfabenets :- ane used foe nondling the event qenostoted ee a these _Lfsteneses_mepseaent —___ |finterifaces, that ose se pomat b ot a Bi eet i jeoayd handling Charli “Keapboasid events.) > Ihen-a— aS Neqate, pened “ice. OReaED evant 48 genasiated . — This gesule fn a coll tp — kuyPresred() event handler fo_Meleaned KEY. RELEASED event fs =,-When_o_Key sani ayes ond... handles $4 executed = Th-a—chonacten 15 —Genosiaked trom Mat keay _shovke——§ __kEY—TNPED event 4 _aent & ete d hand ___# Kuybist ones tint wipace contoto fellauding method. © | pubite _woid__maouae Clicked Civinuse Event #227 this . methnd _——-1sTvoked _—ushen qe tion as been elteked on a | Component 7 &n__o__Comptment el neat ee saaigatil ti Tovoked shen 0 mouse loutinn ia puessed om a S06) parser denna Mouse (Mouse Event me) +-Thts fg inwoked ushen a moire cui as been . ——- Bn 4o—a_—_compenent: then. ue as 1s 8 [Wun eBvant class metheds 4 ©) nt_geturioneas Tha Sr ae a | ——+-Mepiresenting a __mouse button aaa es @ Int getxcrs- this method Hekusins the fete eS —% position st the event _oielabive to the sousice component _ ——_ @-ink_get Ver: “thts method sttusina fhe veitfeal Y_ F sauna |) postition _e} the event; srelatPve to the gousice Compenerd. oases ve ees mouseMoved (MouseEvent e) } +} Shounstotis mouseMoved 2" 4p es Geex Oo $8 0 4 fag Bm { a Yo) eee ee | [ase Comp enenta _ e vatat -——___—— habel fe op et [[p bebe HT sex Uftetd | Continet 7 a Button Panel KJ 3 ~ (ranted ae a Roe fs o\tarnpenant. Skat wootks as _mofn top level | window Of, the Gut _applfcations oie t Fuome % coeated ust Forame clan, FSyntoxt Fuame $= new. Frame Gun); f Fou ony —GuT_applicatfon, the Aft step 2 to coeate a— Fhe ate a metods to ctsate 9 frame i 1 © By extending —-the frame class _ . s oe eet Bpame_caas ieee aa at Papas iste scompementa4 thot -llnst_ping __multtple ——_____|: compenents eB ae a Tes _ceteated _usfng —_Panel_clax sect Me ead te Ss | | | | blo Fou fait sthat panel fs_an fntewnal Segien tn _Fuame 9h iS ° toate si while sth _}rame fa sie-sizable ,moveable - Progam GYT application the Compenents fn mss Sans S_ a “si +Eoxt, West, —+———Soutta and Center. cme ‘spas aoe ey viele epee ees Fk fit Sia sie os pescpraaner pair Se eg Bovdea Demo C). Pane go ———}; Frame} = noun _Fotame (7); e | Button __bexi = new Button ("Nor TH D5 ae lwes| CENTER | FAST | Baton aoa = new Button (9 ¥) 5 Button _boxa_= new Bution (3p = 1 _Bufon boy = new Button (Ys Ration oes nee Bata (5 Baton boxe > new Button (e8)¢ Button bot > nun Button (Ys); Button _boxa= nao Button (ve $—§_____ Button bea > hes Button ("4") ; | }radd Chox i) —}— radalteoxt)3 a ——hada Vooxs) t : _ {odd [boxes oe }eada Cox); : Saeed Cre Cprtdlanout (2,3) 5 a Sa ean ea att (sietog_oogeta) oe a eee es Mise) sae! S aes = AWT _atands hot _Abstact Window “Tool kee a eae Be—td_ptdeetaping Gyno —_—— | _based tO Tanta ——=| [Boeay Orrin a sana ava. Foundatton classes [Fc) thot _ pucvides __a_toast to _loufld platfoum fndependent eee ae ~Spaphtcat tpplicaMeng et tt —_____. =} Tavo.at —parkage _Combatns cust APT. classes ee ose as —___, texthietd babel 4 Textasiea , RadioButton | Check box Chofce , Hed oe z : ss |, Gur Basics i s =. Gul Invelves_ustng pramewouk Ike suofng & Tavakx to i || ete pie Ata uss A ——psung' Rtnndtitonal _fyommesooitk that _piovider_a_uside — tng oh tongpnanhs—A—Layut manages jot caatng — Pee) dunktop _oppltcotten . ete cote eee —_¢ Jano EX i- A__moue Home wok designed fore ——-bulldtng — Hic and Tats Se ¢ 3 —rauliimedta and 3D Graphies 0 _____—ftayjouk managers : 3 ced to _oowiangs the component — we txomples oss Gee 2 a acd’ EEL] Component i AWT psinvides vasfoua _Compenents choy ————|lbuHtong_, Lalla, text Feld, Check boxes , used pox ceaing ; ot fe an Eevatira careers a conkatnw -_ AWT provides contoinwa Wke_ panda, _ Ee 1 fprarnes Dialogs to. osiganize and eur epee Hee application, a = Layout manager fl L rnonagen axe 9 _eape — —. Bacionging ing data ome re Contafnen — ——f £ome of a ae a east Bonds: , Loyaat 5 er bee tenant La — ee ea ays =| Event handling. A oT Aine eluall to. handle in oe | events ike —Kesboaad _and_ —rasuat-sating event Listen ——flondcdapteia 0, 6 i ps ee reece = =| Guaphica and Dhausfogs i Tk ta a} _Yeabe_of Alot Phot —_hebps tp __dsiasn__ahapu_, tnaent | Sraages ond pasate ptt ' vomite text fn the —Compenent 6} favo: application. ‘Window + Window fs o- dee bank Container that super ——} 9 peapdnt ed A lng eboe _@| Game + tthe fplarne a Conmtofnex thot contafna the Brule bow and bonicde pee Dialog =P. dalog box Sh temapetonuy —uedow of an — appticatfon it “Wis 23 used to wetofive Uses Taput __ LI LU | ® Bustin 2 A__cltckolale element that taiggest on action — : -Lobbets A _non - editable _text_element used _todtaplas = | fn}osinaasion, ® (Text _ffedd s-An edttoble loox _ushesie user Can input text © Radio Inwtton t- Auton thet —alllo.o’ uses _to_Beleck —— | Chotce 2 Like fn ghow a popup menu pone Tent _osien t-“Tent oven $a ter. Component that allouss Joedting —of,—maltiple Ltn often Ziagletine_ofest | ; 0) yt A han Townes a da st how Lapterttas Eating aps Orickest ae enable baet to select — © Fi file. dialog contol ee) —___| utfindow —_}etorn Hae user “con Select —

You might also like