SlideShare una empresa de Scribd logo
1 de 13
Descargar para leer sin conexión
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

Más contenido relacionado

Último

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 

Último (20)

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 

Destacado

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
 

Destacado (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