Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. C H A P T E R T E N Event-Driven Programming.

Slides:



Advertisements
Similar presentations
Programming in Java; Instructor:John Punin Graphics and Graphical User Interfaces1 Programming in Java Graphics and Graphical User Interfaces.
Advertisements

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter Four Trusses.
Microsoft® Small Basic
03_25 Osmosis Slide number: 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Protein molecule Water molecule.
Chapter 6 Graphical User Interface (GUI) and Object-Oriented Design (OOD)
Title Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 18 Image Slides.
Insertion Sort.
Event Handling Events and Listeners Timers and Animation.
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 16 Event-Driven Programming Of all men’s miseries.
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 16 Event-Driven Programming Of all men’s miseries.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. PowerPoint Presentation Materials For Instructor’s Online.
COMPSCI 125 Spring 2005 ©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Sample Development: HiLo Game *Chapter 6: Console.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Chapter 14 GUI and Event-Driven Programming.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 4 Image Slides.
CS 112 GUI 06 May 2008 Bilkent. Java GUI API Containers: ◦ contain other GUI components. E.g, Window, Panel, Applet, Frame Dialog. Components: ◦ Buttons,
Copyright © The McGraw-Hill Companies, Inc
Title Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 17 Image Slides.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 2 Image Slides.
Chapter 8 Traffic-Analysis Techniques. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 8-1.
Programming Task: Task 1 Controlled Assessment Practice.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. C H A P T E R S E V E N Object-Oriented Programming.
Java Programming, 3e Concepts and Techniques Chapter 3 Section 65 – Manipulating Data Using Methods – Java Applet.
Welcome to CIS 083 ! Events CIS 068.
Java Programming: From Problem Analysis to Program Design, Second Edition1  Learn about basic GUI components.  Explore how the GUI components JFrame,
Copyright ©2002 by the McGraw-Hill Companies, Inc. Presidential Elections, An interactive version of this map can be found at
C H A P T E R T E N Event-Driven Programming Programming Languages – Principles and Paradigms by Allen Tucker, Robert Noonan.
Graphical User Interface Components Chapter What You Will Learn Text Areas Text Areas Sliders Sliders Menus Menus –With frames –Pop up menus Look.
Java GUI’s are event driven, meaning they generate events when the user interacts with the program. Typical events are moving the mouse, clicking a mouse.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 14 Event-Driven Programming.
Dale Roberts GUI Programming using Java - Event Handling Dale Roberts, Lecturer Computer Science, IUPUI Department of Computer.
17.16 Synthesis of Thyroid Hormone (TH) Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Slide number: 1.
 2002 Prentice Hall, Inc. All rights reserved Introduction Graphical User Interface (GUI) –Gives program distinctive “look” and “feel” –Provides.
– Advanced Programming P ROGRAMMING IN Lecture 21 Introduction to Swing.
1 Outline 1 Introduction 2 Overview of Swing Components 3 JLabel 4 Event Handling 5 TextFields 6 How Event Handling Works 7 JButton 8 JCheckBox and JRadioButton.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter Seven ATM LANs.
Graphics and Event-Driven Programming in Java John C. Ramirez Department of Computer Science University of Pittsburgh.
Object-Oriented Program Development Using Java: A Class-Centered Approach, Enhanced Edition.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Image Slides.
03_33 Receptor-mediated endocytosis Slide number: 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Molecules.
The Abstract Window Toolkit (AWT) supports Graphical User Interface (GUI) programming. AWT features include: a rich set of user interface components; a.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
Object Oriented Programming.  Interface  Event Handling.
SEEM3460 Tutorial GUI in Java. Some Basic GUI Terms Component (Control in some languages) the basic GUI unit something visible something that user can.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. C H A P T E R E L E V E N Concurrent Programming.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter Eight Live Load Forces: Influence Lines for Determinate.
© Dr Simin Nasseri Southern Polytechnic State University 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
JAVA: An Introduction to Problem Solving & Programming, 6 th Ed. By Walter Savitch ISBN © 2012 Pearson Education, Inc., Upper Saddle River,
06_06 Enzymatic action Slide number: 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. active site enzyme.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter Three Statics of Structures Reactions.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter Chapter 7-3 ( Book Chapter 14) GUI and Event-Driven Programming.
Java With NetBeans First Project. Java Are language for this semester is Java The Development Environment is Netbeans.
MATLAB and SimulinkLecture 61 To days Outline Graphical User Interface (GUI) Exercise on this days topics.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter Fifteen Approximate Analysis of Indeterminate Structures.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 7.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. PowerPoint Presentation Materials For Instructor’s Resources.
Chapter 13 Transportation Demand Analysis. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display
12-Jun-16 Event loops. 2 Programming in prehistoric times Earliest programs were all “batch” processing There was no interaction with the user Input Output.
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 16 Event-Driven Programming Of all men’s miseries.
Prepared by: Dr. Abdallah Mohamed, AOU-KW Unit7: Event-driven programming 1.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter Chapter 7 ( Book Chapter 14) GUI and Event-Driven Programming.
GUI Programming using Java - Event Handling
Visual Basic Code & No.: CS 218
Chapter Topics 15.1 Graphical User Interfaces
Copyright © The McGraw-Hill Companies, Inc
Extend Text Editor to Draw shapes
Chapter 15: GUI Applications & Event-Driven Programming
Copyright © The McGraw-Hill Companies, Inc
CHAPTER 6 SKELETAL SYSTEM
Presentation transcript:

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. C H A P T E R T E N Event-Driven Programming

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display Imperative and Event-Driven Paradigms Contrasted Figure 10.1

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display Java Class AWTEvent and Its Subclasses* Figure 10.2

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display Subclasses of Component That Can Be Sources of Events Figure 10.3

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display Java EventListener Class Interface and Its Subclasses* Figure 10.4

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display Handlers Required for Button, Menu, Text Typing, and Mouse Events Figure 10.5

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display Overall Structure of a Java Applet Figure 10.6

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display Initial Frame Design for a Graphical Drawing Tool Figure 10.7

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display Code to Define the State for the Interaction Figure 10.8

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display Code to Initialize the Interaction Figure 10.9

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display First Step in an Interaction: The User Selects Rectangle from the Menu Figure 10.10

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display ItemStateChanged Handler for This Interaction Figure 10.11

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display Details of the mouseClicked Handler for This Interaction Figure 10.12

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display Effect of Selecting Rectangle Choice and Clicking the Mouse Twice Figure 10.13

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display ActionPerformed Handler for the Clear Button Figure 10.14

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display ActionPerformed Handler for the Enter Key in the Typing Area Figure 10.15

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display Net Effect of User Placing a Text in the Frame Figure 10.16

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display State Variables for Class Cell Figure 10.17

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display Important Methods in Class Cell Figure 10.18

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display Public Variables and Methods in Class Grid Figure 10.19

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display Creation of a New Grid in a Frame Figure 10.20

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display Placement of an X in the Grid Figure 10.21

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display Initial State for the Tic-Tac-Toe Interaction Figure 10.22

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display The mouseClicked Handler for Tic-Tac-Toe Figure 10.23

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display Tic-Tac-Toe’s Paint Method Figure 10.24

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display New Game Handler Figure 10.25

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display Elements of a Typical ATM Machine Transaction User Interface Figure 10.26

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display Overall Design of a Home Security System Figure 10.27