Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

1 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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


Download ppt "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."

Similar presentations


Ads by Google