SlideShare a Scribd company logo
1 of 23
By
Shraddha Sheth
Neel Shah
o The Event Handling Process
o Event Classes
o Semantic Event Handling in Applets
o Semantic Event Handling in an Application

enableEvents(WINDOW_EVENT_MASK | MOUSE_EVENT_MASK);
Go
WINDOW_OPENED
 The event that occurs the first time a window is made
visible.
WINDOW_CLOSING
 The event that occurs as a result of the close icon being
selected or Close being selected from the window’s system
menu.
WINDOW_CLOSED
 The event that occurs when the window has been closed.
WINDOW_ACTIVATED
 The event that occurs when the window is activated—
obtains the focus, in other words. When another GUI
component has the focus,you could make the window obtain
the focus by clicking on it, for
WINDOW_DEACTIVATED
 The event that occurs when the window is deactivated—loses the
focus, in other words. Clicking on another window would cause this
event.
WINDOW_GAINED_FOCUS
 The event that occurs when the window gains the focus. This implies
that the window or one of its components will receive keyboard
events.
WINDOW_LOST_FOCUS
 The event that occurs when the window loses the focus. This implies
that keyboard events will not be delivered to the window or any of
its components.
WINDOW_ICONIFIED
 The event that occurs when the window is minimized and reduced
to an icon.
WINDOW_DEICONIFIED
 The event that occurs when the window is restored from an icon.
WINDOW_STATE_CHANGED
 The event that occurs when the window state changes—when it
ismaximized or minimized, for instance.
processWindowFocusEvent(WindowEvent e)
This method is called for any window focus
events that arise as long as such events are
enabled for the window.
processWindowStateEvent(WindowEvent e)
This method is called for events arising as a
result of the window changing state.
processEvent(AWTEvent e)
This method is called first for any events that are enabled
for the component. If you implement this method and
fail to call the base class method, none of the methods
for specific groups of events will be called.
processFocusEvent(FocusEvent e)
 This method will be called for focus events, if they are
enabled for the component.
processKeyEvent(KeyEvent e)
This method will be called for key events, if they are
enabled for the component.
processMouseEvent(MouseEvent e)
This method will be called for mouse button events, if
they are enabled for the component.
processMouseMotionEvent(MouseEvent e)
This method will be called for mouse move and drag
events, if they are enabled for the component.
processMouseWheelEvent(MouseWheelEvent e)
This method will be called for mouse wheel rotation
events, if they are enabled for the component
The WindowListener Interface
The WindowFocusListener Interface
The WindowStateListener Interface
The MouseListener Interface
The MouseMotionListener Interface
The MouseWheelListener Interface
The KeyListener Interface
The FocusListener Interface
windowGainedFocus(WindowEvent e)
 Called when the window gains the focus such that the
window or one of its components will receive keyboard
events.
windowLostFocus(WindowEvent e)
Called when the window loses the focus. After this
event, neither the window nor any of its components
will receive keyboard events.
The WindowStateListener Interface
windowStateChanged(WindowEvent e)
Called when the window state changes—when it is
maximized or iconified.
The MouseMotionListener Interface
mouseMoved(MouseEvent e)
 Called when the mouse is moved within a component
mouseDragged(MouseEvent e)
 Called when the mouse is moved within a component
while a mouse button is held down
The MouseWheelListener Interface
mouseWheelMoved(MouseWheelEvent e)
Called when the mouse wheel is rotated
Go
The KeyListener Interface
This interface defines methods to respond to events
arising when a key on the keyboard is pressed or released.
keyTyped(KeyEvent e)
 Called when a key on the keyboard is pressed and then
released
keyPressed(KeyEvent e)
 Called when a key on the keyboard is pressed
keyReleased(KeyEvent e)
 Called when a key on the keyboard is released
The FocusListener Interface
This interface defines methods to respond to a component
gaining or losing the focus.
focusGained(FocusEvent e)
 Called when a component gains the keyboard focus
focusLost(FocusEvent e)
 Called when a component loses the keyboard focus Go
FocusAdapter
WindowAdapter
KeyAdapter
MouseAdapter
MouseMotionAdapter
MouseInputAdapter
Go
Semantic Event Listeners
ActionListener
void actionPerformed(ActionEvent e)
ItemListener
void itemStateChanged(ItemEvent e)
AdjustmentListener
void adjustmentValueChanged(AdjustmentEvent e)
Go
Example

More Related Content

What's hot

Unit-3 event handling
Unit-3 event handlingUnit-3 event handling
Unit-3 event handlingAmol Gaikwad
 
Advance Java Programming(CM5I) Event handling
Advance Java Programming(CM5I) Event handlingAdvance Java Programming(CM5I) Event handling
Advance Java Programming(CM5I) Event handlingPayal Dungarwal
 
Event handling63
Event handling63Event handling63
Event handling63myrajendra
 
Event handling
Event handlingEvent handling
Event handlingswapnac12
 
JAVA GUI PART III
JAVA GUI PART IIIJAVA GUI PART III
JAVA GUI PART IIIOXUS 20
 
Ajp notes-chapter-03
Ajp notes-chapter-03Ajp notes-chapter-03
Ajp notes-chapter-03Ankit Dubey
 
12 High Level UI Event Handling
12 High Level UI Event Handling12 High Level UI Event Handling
12 High Level UI Event Handlingcorneliuskoo
 
Chapter 11.5
Chapter 11.5Chapter 11.5
Chapter 11.5sotlsoc
 
Java gui event
Java gui eventJava gui event
Java gui eventSoftNutx
 
Dr Jammi Ashok - Introduction to Java Material (OOPs)
 Dr Jammi Ashok - Introduction to Java Material (OOPs) Dr Jammi Ashok - Introduction to Java Material (OOPs)
Dr Jammi Ashok - Introduction to Java Material (OOPs)jammiashok123
 
Lesson 07 Actions and Commands in WPF
Lesson 07 Actions and Commands in WPFLesson 07 Actions and Commands in WPF
Lesson 07 Actions and Commands in WPFQuang Nguyễn Bá
 
Graphical User Interface (GUI) - 2
Graphical User Interface (GUI) - 2Graphical User Interface (GUI) - 2
Graphical User Interface (GUI) - 2PRN USM
 
Advance Java Programming (CM5I) 2.Swing
Advance Java Programming (CM5I) 2.SwingAdvance Java Programming (CM5I) 2.Swing
Advance Java Programming (CM5I) 2.SwingPayal Dungarwal
 

What's hot (20)

Unit-3 event handling
Unit-3 event handlingUnit-3 event handling
Unit-3 event handling
 
Event handling
Event handlingEvent handling
Event handling
 
Advance Java Programming(CM5I) Event handling
Advance Java Programming(CM5I) Event handlingAdvance Java Programming(CM5I) Event handling
Advance Java Programming(CM5I) Event handling
 
Event handling63
Event handling63Event handling63
Event handling63
 
Event handling
Event handlingEvent handling
Event handling
 
What is Event
What is EventWhat is Event
What is Event
 
JAVA GUI PART III
JAVA GUI PART IIIJAVA GUI PART III
JAVA GUI PART III
 
Ajp notes-chapter-03
Ajp notes-chapter-03Ajp notes-chapter-03
Ajp notes-chapter-03
 
Swing
SwingSwing
Swing
 
Lecture8 oopj
Lecture8 oopjLecture8 oopj
Lecture8 oopj
 
12 High Level UI Event Handling
12 High Level UI Event Handling12 High Level UI Event Handling
12 High Level UI Event Handling
 
Chapter 11.5
Chapter 11.5Chapter 11.5
Chapter 11.5
 
Java gui event
Java gui eventJava gui event
Java gui event
 
Dr Jammi Ashok - Introduction to Java Material (OOPs)
 Dr Jammi Ashok - Introduction to Java Material (OOPs) Dr Jammi Ashok - Introduction to Java Material (OOPs)
Dr Jammi Ashok - Introduction to Java Material (OOPs)
 
Lesson 07 Actions and Commands in WPF
Lesson 07 Actions and Commands in WPFLesson 07 Actions and Commands in WPF
Lesson 07 Actions and Commands in WPF
 
Graphical User Interface (GUI) - 2
Graphical User Interface (GUI) - 2Graphical User Interface (GUI) - 2
Graphical User Interface (GUI) - 2
 
Java: GUI
Java: GUIJava: GUI
Java: GUI
 
09events
09events09events
09events
 
25 awt
25 awt25 awt
25 awt
 
Advance Java Programming (CM5I) 2.Swing
Advance Java Programming (CM5I) 2.SwingAdvance Java Programming (CM5I) 2.Swing
Advance Java Programming (CM5I) 2.Swing
 

Viewers also liked

Viewers also liked (7)

Java programming-Event Handling
Java programming-Event HandlingJava programming-Event Handling
Java programming-Event Handling
 
Awt
AwtAwt
Awt
 
Java awt
Java awtJava awt
Java awt
 
00 swing
00 swing00 swing
00 swing
 
Java session11
Java session11Java session11
Java session11
 
Java AWT
Java AWTJava AWT
Java AWT
 
Applet life cycle
Applet life cycleApplet life cycle
Applet life cycle
 

Similar to Java Event Handling

engineeringdsgtnotesofunitfivesnists.ppt
engineeringdsgtnotesofunitfivesnists.pptengineeringdsgtnotesofunitfivesnists.ppt
engineeringdsgtnotesofunitfivesnists.pptsharanyak0721
 
event-handling.pptx
event-handling.pptxevent-handling.pptx
event-handling.pptxGood657694
 
Mobile Application Development
Mobile Application DevelopmentMobile Application Development
Mobile Application DevelopmentMuhammad Sajid
 
Yahoo presentation: JavaScript Events
Yahoo presentation: JavaScript EventsYahoo presentation: JavaScript Events
Yahoo presentation: JavaScript EventsPeter-Paul Koch
 
event handling new.ppt
event handling new.pptevent handling new.ppt
event handling new.pptusama537223
 
Java Abstract Window Toolkit (AWT) Presentation. 2024
Java Abstract Window Toolkit (AWT) Presentation. 2024Java Abstract Window Toolkit (AWT) Presentation. 2024
Java Abstract Window Toolkit (AWT) Presentation. 2024kashyapneha2809
 
Java Abstract Window Toolkit (AWT) Presentation. 2024
Java Abstract Window Toolkit (AWT) Presentation. 2024Java Abstract Window Toolkit (AWT) Presentation. 2024
Java Abstract Window Toolkit (AWT) Presentation. 2024nehakumari0xf
 
ITE 1122_ Event Handling.pptx
ITE 1122_ Event Handling.pptxITE 1122_ Event Handling.pptx
ITE 1122_ Event Handling.pptxudithaisur
 
java Unit4 chapter1 applets
java Unit4 chapter1 appletsjava Unit4 chapter1 applets
java Unit4 chapter1 appletsraksharao
 
FirefoxOS Window Management
FirefoxOS Window ManagementFirefoxOS Window Management
FirefoxOS Window ManagementAlive Kuo
 
JEDI Slides-Intro2-Chapter20-GUI Event Handling.pdf
JEDI Slides-Intro2-Chapter20-GUI Event Handling.pdfJEDI Slides-Intro2-Chapter20-GUI Event Handling.pdf
JEDI Slides-Intro2-Chapter20-GUI Event Handling.pdfMarlouFelixIIICunana
 
File Handling
File HandlingFile Handling
File HandlingSohanur63
 
Advance java for bscit
Advance java for bscitAdvance java for bscit
Advance java for bscitYogeshDhamke2
 
Voices That Matter: JavaScript Events
Voices That Matter: JavaScript EventsVoices That Matter: JavaScript Events
Voices That Matter: JavaScript EventsPeter-Paul Koch
 

Similar to Java Event Handling (20)

engineeringdsgtnotesofunitfivesnists.ppt
engineeringdsgtnotesofunitfivesnists.pptengineeringdsgtnotesofunitfivesnists.ppt
engineeringdsgtnotesofunitfivesnists.ppt
 
JAVA AWT
JAVA AWTJAVA AWT
JAVA AWT
 
event-handling.pptx
event-handling.pptxevent-handling.pptx
event-handling.pptx
 
Mobile Application Development
Mobile Application DevelopmentMobile Application Development
Mobile Application Development
 
Java
JavaJava
Java
 
AWT
AWT AWT
AWT
 
Yahoo presentation: JavaScript Events
Yahoo presentation: JavaScript EventsYahoo presentation: JavaScript Events
Yahoo presentation: JavaScript Events
 
event handling new.ppt
event handling new.pptevent handling new.ppt
event handling new.ppt
 
Lecture 18
Lecture 18Lecture 18
Lecture 18
 
Androd Listeners
Androd ListenersAndrod Listeners
Androd Listeners
 
Java Abstract Window Toolkit (AWT) Presentation. 2024
Java Abstract Window Toolkit (AWT) Presentation. 2024Java Abstract Window Toolkit (AWT) Presentation. 2024
Java Abstract Window Toolkit (AWT) Presentation. 2024
 
Java Abstract Window Toolkit (AWT) Presentation. 2024
Java Abstract Window Toolkit (AWT) Presentation. 2024Java Abstract Window Toolkit (AWT) Presentation. 2024
Java Abstract Window Toolkit (AWT) Presentation. 2024
 
ITE 1122_ Event Handling.pptx
ITE 1122_ Event Handling.pptxITE 1122_ Event Handling.pptx
ITE 1122_ Event Handling.pptx
 
java Unit4 chapter1 applets
java Unit4 chapter1 appletsjava Unit4 chapter1 applets
java Unit4 chapter1 applets
 
Unit 6 Java
Unit 6 JavaUnit 6 Java
Unit 6 Java
 
FirefoxOS Window Management
FirefoxOS Window ManagementFirefoxOS Window Management
FirefoxOS Window Management
 
JEDI Slides-Intro2-Chapter20-GUI Event Handling.pdf
JEDI Slides-Intro2-Chapter20-GUI Event Handling.pdfJEDI Slides-Intro2-Chapter20-GUI Event Handling.pdf
JEDI Slides-Intro2-Chapter20-GUI Event Handling.pdf
 
File Handling
File HandlingFile Handling
File Handling
 
Advance java for bscit
Advance java for bscitAdvance java for bscit
Advance java for bscit
 
Voices That Matter: JavaScript Events
Voices That Matter: JavaScript EventsVoices That Matter: JavaScript Events
Voices That Matter: JavaScript Events
 

Recently uploaded

Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 

Recently uploaded (20)

Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 

Java Event Handling

  • 2. o The Event Handling Process o Event Classes o Semantic Event Handling in Applets o Semantic Event Handling in an Application 
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 9. WINDOW_OPENED  The event that occurs the first time a window is made visible. WINDOW_CLOSING  The event that occurs as a result of the close icon being selected or Close being selected from the window’s system menu. WINDOW_CLOSED  The event that occurs when the window has been closed. WINDOW_ACTIVATED  The event that occurs when the window is activated— obtains the focus, in other words. When another GUI component has the focus,you could make the window obtain the focus by clicking on it, for
  • 10. WINDOW_DEACTIVATED  The event that occurs when the window is deactivated—loses the focus, in other words. Clicking on another window would cause this event. WINDOW_GAINED_FOCUS  The event that occurs when the window gains the focus. This implies that the window or one of its components will receive keyboard events. WINDOW_LOST_FOCUS  The event that occurs when the window loses the focus. This implies that keyboard events will not be delivered to the window or any of its components. WINDOW_ICONIFIED  The event that occurs when the window is minimized and reduced to an icon. WINDOW_DEICONIFIED  The event that occurs when the window is restored from an icon. WINDOW_STATE_CHANGED  The event that occurs when the window state changes—when it ismaximized or minimized, for instance.
  • 11. processWindowFocusEvent(WindowEvent e) This method is called for any window focus events that arise as long as such events are enabled for the window. processWindowStateEvent(WindowEvent e) This method is called for events arising as a result of the window changing state.
  • 12. processEvent(AWTEvent e) This method is called first for any events that are enabled for the component. If you implement this method and fail to call the base class method, none of the methods for specific groups of events will be called. processFocusEvent(FocusEvent e)  This method will be called for focus events, if they are enabled for the component. processKeyEvent(KeyEvent e) This method will be called for key events, if they are enabled for the component.
  • 13. processMouseEvent(MouseEvent e) This method will be called for mouse button events, if they are enabled for the component. processMouseMotionEvent(MouseEvent e) This method will be called for mouse move and drag events, if they are enabled for the component. processMouseWheelEvent(MouseWheelEvent e) This method will be called for mouse wheel rotation events, if they are enabled for the component
  • 14. The WindowListener Interface The WindowFocusListener Interface The WindowStateListener Interface The MouseListener Interface The MouseMotionListener Interface The MouseWheelListener Interface The KeyListener Interface The FocusListener Interface
  • 15.
  • 16. windowGainedFocus(WindowEvent e)  Called when the window gains the focus such that the window or one of its components will receive keyboard events. windowLostFocus(WindowEvent e) Called when the window loses the focus. After this event, neither the window nor any of its components will receive keyboard events. The WindowStateListener Interface windowStateChanged(WindowEvent e) Called when the window state changes—when it is maximized or iconified.
  • 17.
  • 18. The MouseMotionListener Interface mouseMoved(MouseEvent e)  Called when the mouse is moved within a component mouseDragged(MouseEvent e)  Called when the mouse is moved within a component while a mouse button is held down The MouseWheelListener Interface mouseWheelMoved(MouseWheelEvent e) Called when the mouse wheel is rotated Go
  • 19. The KeyListener Interface This interface defines methods to respond to events arising when a key on the keyboard is pressed or released. keyTyped(KeyEvent e)  Called when a key on the keyboard is pressed and then released keyPressed(KeyEvent e)  Called when a key on the keyboard is pressed keyReleased(KeyEvent e)  Called when a key on the keyboard is released The FocusListener Interface This interface defines methods to respond to a component gaining or losing the focus. focusGained(FocusEvent e)  Called when a component gains the keyboard focus focusLost(FocusEvent e)  Called when a component loses the keyboard focus Go
  • 21.
  • 22. Semantic Event Listeners ActionListener void actionPerformed(ActionEvent e) ItemListener void itemStateChanged(ItemEvent e) AdjustmentListener void adjustmentValueChanged(AdjustmentEvent e) Go