Book contents
- Frontmatter
- Contents
- Preface
- PART ONE FOUNDATIONS
- 1 Cornerstones of OOP
- 2 Objects
- 3 Class Construction
- 4 Relationships between Classes
- 5 GUIs: Basic Concepts
- 6 Implementing Simple GUIs in Java
- 7 Errors and Exceptions
- 8 Recursion
- PART TWO DATA STRUCTURES
- Appendix A Unified Modeling Language Notation
- Appendix B Complexity of Algorithms
- Appendix C Installing and Using Foundations Classes
- Index
5 - GUIs: Basic Concepts
from PART ONE - FOUNDATIONS
Published online by Cambridge University Press: 05 June 2012
- Frontmatter
- Contents
- Preface
- PART ONE FOUNDATIONS
- 1 Cornerstones of OOP
- 2 Objects
- 3 Class Construction
- 4 Relationships between Classes
- 5 GUIs: Basic Concepts
- 6 Implementing Simple GUIs in Java
- 7 Errors and Exceptions
- 8 Recursion
- PART TWO DATA STRUCTURES
- Appendix A Unified Modeling Language Notation
- Appendix B Complexity of Algorithms
- Appendix C Installing and Using Foundations Classes
- Index
Summary
Most modern software presents a GUI (graphical user interface) for interaction with the user. The GUI typically appears as a window with a variety of widgets (visual components enabling user interaction) in it. These widgets provide information to the user and provide a mechanism for accepting user actions to direct the application. Prior to the Windows revolution, most software was executed from a console using text commands with output in textual format as well. It is our goal to provide the reader with essential knowledge for understanding, designing, and implementing simple GUI applications. In this chapter we present the basic concepts that underlie GUI programming. An overview is given of Java classes that support GUI applications, including those classes that are part of the AWT (abstract windowing toolkit) and the JFC (Java foundation classes). Also in this chapter we present conceptually the design pattern called MVC (model view controller). Implementation in Java of GUI applications and MVC is covered in Chapter 6.
In discussing the operation of a GUI application we may choose one of two points of view: (1) that of the user, or (2) that of the application. As a user we clearly focus on the first point of view; whereas, the developer of a GUI application must focus on both points of view. In that spirit we develop a description of the roles, expectations, and responsibilities of the two major players: user and application.
- Type
- Chapter
- Information
- Fundamentals of OOP and Data Structures in Java , pp. 77 - 94Publisher: Cambridge University PressPrint publication year: 2000