Week 12 Notes PDF

Title Week 12 Notes
Author Kevin Nguyen
Course Introduction To Programming In Java
Institution Virginia Polytechnic Institute and State University
Pages 2
File Size 56.9 KB
File Type PDF
Total Downloads 43
Total Views 152

Summary

Week 12 Lecture Notes from class...


Description

Event Handlers: Event-Driven Processing Event: Usually something the user does, such as moving the mouse, clicking a button, making a menu selection, or resizing a window. Control: An element of a program interface such as a button, slider, text field, or check box. Event Handler: An object that has a method specifically set up to respond to the fact that a particular type of event occurred. Action Event: Indicates that an action occurred Event handling method is defined in the same class for the event handler and object shitters Change Listeners: Change Listener: Notified when something changes The Button Class: The Button Class: Button: A GUI control that allows the user to initiate an action by pushing a graphical button using the mouse - Can pass the text you intend to display on the button face - Need to specify the event handler that will respond to the action event generated when the button is pushed Button Appearance: Can be modified in a variety of ways Check Boxes: Providing Options: Check box: a GUI control that can be toggled on or off - Each check box represents a boolean option - Operate independently of each other Radio Buttons: Mutually Exclusive Options: Radio buttons provides mutually exclusive options, which means only one of the options can be selected at any time. Mouse Events: Responding to the Mouse: Mouse Events: When the user manipulates the mouse Mouse Pressed Event: Occurs when the mouse button is initially pressewd down. Mouse Released Event: Occurs when the button is released

Mouse Clicked Event: When mouse is pressed down and released ono the same node Mouse Moved Event: When mouse pointer is in motion Mouse Dragged Event: When mouse is held down and moved Mouse Entered Event: When the mouse pointer is moved onto the node Mouse Exited Event: When it moves off the node...


Similar Free PDFs