SlideShare une entreprise Scribd logo
1  sur  13
Télécharger pour lire hors ligne
Page:
VDate: lT
Evemt Hamdlimq
Event: Chamqe in status of am abfec
Press a buttom,draq & adrop of moue
EVemt Hamdinq (ompoments
Evenmts
An ewCmt 1s a chanqe in Stufe or m
Ob/ect
Evemt Sorre
Ls m_object fhat qemorates m ewemt
Cistemers
An object fhat istoms to am evmt
A Dstemer. qet motiied when G)
evemt Occcrs
How are eents hmdled ?
O A
sends it with the Sounte to me ov
more /iste es
SOrT Cveny
Omre lisfem rere/ves the Nent, the
eNomt cwill be processed efrDed
o.
7w0 tupeS 01 CYOnts
O Low /0vel evonts
Repreromt direcf commmicatio pom
User
e key_presse Telease
Fo1owmy re lowjeve! ewemh:
0 CmmpdnentEvemt.
FocusE VOm F
keyE vemt
CodtainerEvemt
) WindowEvemt
Page
Date:
Righ 1velevoms: (o Sematc evon
E iCap5u/ates meminq of a_uSer
In1ertuce compovemt
foliowinq ne hiqh lerel' eWmt
OActiomElomd
Adjustm etEvemt (scaol)brr
ZfomE VCNnt
ItemE vem t
TentEv emt
Evemt
ist e 07
Evemt Evemt method
Sore
TTO
Page
Date
1mporf jwca, Swimq.*
impert
/mpo7 (Owa. Gcut. evemt|
owa, a wt.
Class myevemt extemds JFrm2e
J/mp/ememts Achnmtiifem e
mYeN Cmt )
WAAKTRbaReaU DRuttor(iaCLALON,
TeaiFiet cd 1:neuw Jleatfietd (is)
5ellay0uf(new Flowlayout c))
ddl(b)
abebeiady
JButfom 90w JButtm ("clic/e ");
b.adelActicm listomer (this)
add (b);_
SefSie 200,2o0)
Sef Vib/e (_frue)
Setpetqult ClosedperaiOm JFoame EX TT_ONLa
public e void ActIonPetormed(AchenFvew
tsetTeat(" Heluo")
P.s vmShimq oqs)
myevt m 2ew_myevetC)
Page
Date:
aivodeupened
class MWind exkord inm
Label A1
Mhlind O
seldayeAut
add
add
Windeuli his)
public NO1d uindou Opened(ndnuend
ttseTet winoudoftnad
Page
V Date
Windouwtisten r Clas
public class windowerample eatemdJs
JFrome implemens Windowlistem er
o b j e e t
u A t
be
2 0 q
s t o r c 4
abtornpsneAt.
WimdowLIMp/ e )
dddwimdowListemer (this)
SetSie 400,400o
Setlayout ( mul)
SetVishb/e (frue)
ps.v.m Stvinq t) oqs
windowexamp ie w new window exmple)
pubiicvoid windowAciuted (WmdouwEveB e )
S.op." achivafed ");
pubiic vord wmdowClosog(WindowEvemt e
S.0.p. (" closimq")
public voic wmdowDeach vated (
Wim dowEvent e)
S 0 p.(" Deact vated");
Page
Date:
Java Adopter Classes
Provides deroult implem
emtutioon
of isteme intortares
Lf we /nhomit the adap1or
class
we will not be force d topovioe
/272p/ememtuh m ut au methods or
istene 1ntvrtuces. So t Saves
ode.
Owa. awt.ew Omt/tdapter
ListomeTIntertace
Wimdo wBdo listem er WImdowPoapt py
KeyListemex
MtaselUTtene
MouseMoionLisfemoY
A.dapter Class
Keyfdapter
Focuststemor
Lompom entlistener
CntwnertistenY
Hieaarhy3oumdslitener
public Class CwindowCXOmp/e extermds
Thepe Windorwhdapfer
windouGKONp/e ()
JFrme new RPe ()
1.addwIn dowlistener e Nirdaurdopdto4)
sefize (300,300)ISeflayoui (mulu)
sef Visible ( frue)
p.s,V, m ( Shinq I qs)
CUmdOwOCmpiew New wIndocvCXqYple0
Page
V Date:
public vojd wimdowClosinq(WindowEVon e)
S.op ( windocw_clored").
dvantug es
Reuseability of classes
Makes císes more visibe
Omretated closses cm wOr
toerher
Snme class cm be usedim my Cwaus
Page:
T
Date:I|
/17ONYmoUs InnerClass 17mCwa
ZmeC/ass without mome
Cmly Simqle. object iÍ oeoted
J
Defn:
A claSs thaf hos No manme kmowr
as cm momymous /nmer class
Used you howe to 0ove7dp
a method of tlass /7tetare
Cm be ceatecd 1 tw0 waysS
O ClasS ( abstoa ct r comTe1e
InteÍo Ce_
abstra ct class_pOIOn
abstadct yoid eat.()
class est
P.Sym 51nmqtj_aqS)_
Peoscm N etw peISON t)
V0id eat () OvCrTide
.0p Nire"):
p eat )__
Page:
Date: L
inter tace
/nictu ce_eatable
void eat c)
Class fest
eatuble e mew eatoble()_
override
pubiic yoic eat C)
S.op(Nice"
e.eatt
Page
Date:
Jmemy Relat ecd classe
JmemBar, TMemu JMenulfem
pant of swimq packaqe
JMemuBar ttaimsJMemu dbjects
J Memu 0b/ect awhem seiectecidiplca
DOpop Showimq Cme c more JMemdTfe
are
COms1auctor
Tmemu Bar (
Tmen )
Tm emu Stvmg mame
Methods
add Tmemu C)_
add ( Compmemt c)
dd Compomemt n t imdea
add d Stzin S)-Oppend
JMenaBar mb: mew J17or7UKr()
Imemut: ew TMemu ("_File");_
e 22ew TMenu ("Edit")
Jmenultem o : mecw 7Memwl1em["pon
.add o)_
Page
Date:
TFile ChooseN Swinq).
CJsed to selec a hl, folder by arer
Constouctoa
Jfie ChoosCr () -User odefault dizectoay
TF7e Chooser(SIrinq) - qivn path
ThieCh00s File P)-q/te fe as poh
Method
I show0penDialoq()
getSelectecl Frle )
e1Ab solutePath )
TCol-Chods er
Used to Create a color chooser dialoq
bo so that Us er com serect om COtbr.
Constructor
(O) Jolorhooser C) '
Osed. to crcate a Color cChoosCr pOmej
Cvifh white co/0 /nitially
TColor Choosor color initialco lor)
OIsed to cyeate a colo choose pmej
CWIth Specifred coro initally .
Methods
O vord addchooserPamet (Absbartlolorhoasfar
Pmei)
Us ed to add a colochoose prmetto the
color hooso
O stat1C (olo shocw DIalo q ( Compooomt c
Stormq tifie'Color mialCo10r)
CsedU to show color choasco dialoq bo
Page
Date
DialoqS Messaqe,
Contirmatom)1rp)F
TAle Ghooser, JCOlorChoose
Dialoq windocw is am /ndepemdem
Sabcuim do w to show femPorrY Noe
apart hom maun Swlng
Most dialoqs poesont C eot
_ Cuorn
ihq 7o User bu dialo94 C
po esomt mbqes, dioectory tres
TO Ceate mple dialoqs you Cn
ImP
appn cwindea
USe OptionPome class
TWO Othor closses TToloochooser P
JHethoaser Supply Stom dad dialoqs
Dialo q b0
C M1ode aialog bon
(3 modeless didloq box
UNIT 5- AWT AND SWING.pdf

Contenu connexe

Dernier

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Dernier (20)

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 

En vedette

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

En vedette (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

UNIT 5- AWT AND SWING.pdf

  • 1. Page: VDate: lT Evemt Hamdlimq Event: Chamqe in status of am abfec Press a buttom,draq & adrop of moue EVemt Hamdinq (ompoments Evenmts An ewCmt 1s a chanqe in Stufe or m Ob/ect Evemt Sorre Ls m_object fhat qemorates m ewemt Cistemers An object fhat istoms to am evmt A Dstemer. qet motiied when G) evemt Occcrs How are eents hmdled ? O A sends it with the Sounte to me ov more /iste es SOrT Cveny Omre lisfem rere/ves the Nent, the eNomt cwill be processed efrDed o. 7w0 tupeS 01 CYOnts O Low /0vel evonts Repreromt direcf commmicatio pom User e key_presse Telease Fo1owmy re lowjeve! ewemh: 0 CmmpdnentEvemt. FocusE VOm F keyE vemt CodtainerEvemt ) WindowEvemt
  • 2. Page Date: Righ 1velevoms: (o Sematc evon E iCap5u/ates meminq of a_uSer In1ertuce compovemt foliowinq ne hiqh lerel' eWmt OActiomElomd Adjustm etEvemt (scaol)brr ZfomE VCNnt ItemE vem t TentEv emt Evemt ist e 07 Evemt Evemt method Sore
  • 3. TTO Page Date 1mporf jwca, Swimq.* impert /mpo7 (Owa. Gcut. evemt| owa, a wt. Class myevemt extemds JFrm2e J/mp/ememts Achnmtiifem e mYeN Cmt ) WAAKTRbaReaU DRuttor(iaCLALON, TeaiFiet cd 1:neuw Jleatfietd (is) 5ellay0uf(new Flowlayout c)) ddl(b) abebeiady JButfom 90w JButtm ("clic/e "); b.adelActicm listomer (this) add (b);_ SefSie 200,2o0) Sef Vib/e (_frue) Setpetqult ClosedperaiOm JFoame EX TT_ONLa public e void ActIonPetormed(AchenFvew tsetTeat(" Heluo") P.s vmShimq oqs) myevt m 2ew_myevetC)
  • 4. Page Date: aivodeupened class MWind exkord inm Label A1 Mhlind O seldayeAut add add Windeuli his) public NO1d uindou Opened(ndnuend ttseTet winoudoftnad
  • 5. Page V Date Windouwtisten r Clas public class windowerample eatemdJs JFrome implemens Windowlistem er o b j e e t u A t be 2 0 q s t o r c 4 abtornpsneAt. WimdowLIMp/ e ) dddwimdowListemer (this) SetSie 400,400o Setlayout ( mul) SetVishb/e (frue) ps.v.m Stvinq t) oqs windowexamp ie w new window exmple) pubiicvoid windowAciuted (WmdouwEveB e ) S.op." achivafed "); pubiic vord wmdowClosog(WindowEvemt e S.0.p. (" closimq") public voic wmdowDeach vated ( Wim dowEvent e) S 0 p.(" Deact vated");
  • 6. Page Date: Java Adopter Classes Provides deroult implem emtutioon of isteme intortares Lf we /nhomit the adap1or class we will not be force d topovioe /272p/ememtuh m ut au methods or istene 1ntvrtuces. So t Saves ode. Owa. awt.ew Omt/tdapter ListomeTIntertace Wimdo wBdo listem er WImdowPoapt py KeyListemex MtaselUTtene MouseMoionLisfemoY A.dapter Class Keyfdapter Focuststemor Lompom entlistener CntwnertistenY Hieaarhy3oumdslitener public Class CwindowCXOmp/e extermds Thepe Windorwhdapfer windouGKONp/e () JFrme new RPe () 1.addwIn dowlistener e Nirdaurdopdto4) sefize (300,300)ISeflayoui (mulu) sef Visible ( frue) p.s,V, m ( Shinq I qs) CUmdOwOCmpiew New wIndocvCXqYple0
  • 7. Page V Date: public vojd wimdowClosinq(WindowEVon e) S.op ( windocw_clored"). dvantug es Reuseability of classes Makes císes more visibe Omretated closses cm wOr toerher Snme class cm be usedim my Cwaus
  • 8. Page: T Date:I| /17ONYmoUs InnerClass 17mCwa ZmeC/ass without mome Cmly Simqle. object iÍ oeoted J Defn: A claSs thaf hos No manme kmowr as cm momymous /nmer class Used you howe to 0ove7dp a method of tlass /7tetare Cm be ceatecd 1 tw0 waysS O ClasS ( abstoa ct r comTe1e InteÍo Ce_ abstra ct class_pOIOn abstadct yoid eat.() class est P.Sym 51nmqtj_aqS)_ Peoscm N etw peISON t) V0id eat () OvCrTide .0p Nire"): p eat )__
  • 9. Page: Date: L inter tace /nictu ce_eatable void eat c) Class fest eatuble e mew eatoble()_ override pubiic yoic eat C) S.op(Nice" e.eatt
  • 10. Page Date: Jmemy Relat ecd classe JmemBar, TMemu JMenulfem pant of swimq packaqe JMemuBar ttaimsJMemu dbjects J Memu 0b/ect awhem seiectecidiplca DOpop Showimq Cme c more JMemdTfe are COms1auctor Tmemu Bar ( Tmen ) Tm emu Stvmg mame Methods add Tmemu C)_ add ( Compmemt c) dd Compomemt n t imdea add d Stzin S)-Oppend JMenaBar mb: mew J17or7UKr() Imemut: ew TMemu ("_File");_ e 22ew TMenu ("Edit") Jmenultem o : mecw 7Memwl1em["pon .add o)_
  • 11. Page Date: TFile ChooseN Swinq). CJsed to selec a hl, folder by arer Constouctoa Jfie ChoosCr () -User odefault dizectoay TF7e Chooser(SIrinq) - qivn path ThieCh00s File P)-q/te fe as poh Method I show0penDialoq() getSelectecl Frle ) e1Ab solutePath ) TCol-Chods er Used to Create a color chooser dialoq bo so that Us er com serect om COtbr. Constructor (O) Jolorhooser C) ' Osed. to crcate a Color cChoosCr pOmej Cvifh white co/0 /nitially TColor Choosor color initialco lor) OIsed to cyeate a colo choose pmej CWIth Specifred coro initally . Methods O vord addchooserPamet (Absbartlolorhoasfar Pmei) Us ed to add a colochoose prmetto the color hooso O stat1C (olo shocw DIalo q ( Compooomt c Stormq tifie'Color mialCo10r) CsedU to show color choasco dialoq bo
  • 12. Page Date DialoqS Messaqe, Contirmatom)1rp)F TAle Ghooser, JCOlorChoose Dialoq windocw is am /ndepemdem Sabcuim do w to show femPorrY Noe apart hom maun Swlng Most dialoqs poesont C eot _ Cuorn ihq 7o User bu dialo94 C po esomt mbqes, dioectory tres TO Ceate mple dialoqs you Cn ImP appn cwindea USe OptionPome class TWO Othor closses TToloochooser P JHethoaser Supply Stom dad dialoqs Dialo q b0 C M1ode aialog bon (3 modeless didloq box