swingeventhandling.pdf
(
451 KB
)
Pobierz
623005238 UNPDF
GUI Event Handling
Topics
•
The Delegation Event Model
•
Event Classes
•
Event Listeners
>
ActionListener
Method
>
MouseListener
Methods
>
MouseMotionListener
Methods
>
WindowListener
Methods
•
Steps for Creating GUI Applications with
Event Handling
2
Delegation Event Model
What is Delegation Event Model?
•
The Delegation Event Model
>
Model used by Java to handle user interaction
with GUI components
>
Describes how your program can respond to user
interaction
•
Three important players
>
Event Source
>
Event Listener/Handler
>
Event Object
4
Event Source, Event Listener/Handler
•
Event Source
>
GUI component that generates the event
>
Example: button
•
Event Listener/Handler
>
Receives and handles events
>
Contains business logic
>
Example: displaying information useful to the
5
user, computing a value
Plik z chomika:
mystiqal
Inne pliki z tego folderu:
1-javaprogbasics.pdf
(390 KB)
2-javainputkey.pdf
(227 KB)
3-javacontrol.pdf
(370 KB)
commandarguments.pdf
(492 KB)
GCIntro.pdf
(261 KB)
Inne foldery tego chomika:
Zgłoś jeśli
naruszono regulamin