16. Graphical User Interfaces

16.1. Introduction

 

As we have seen, a Graphical User Interface (GUI) creates a certain way of interacting with a program. It is what gives a program its look and feel. In preceding chapters, we have already used the basic components from which GUIs are created, including buttons, text fields, labels, and text areas. Throughout this chapter, we will focus on designing and build- ing GUIs that are easy for users to navigate. However, Java’s GUI li- braries are so large that we will concentrate on only a handful of addi- tional components, including containers, check boxes, radio buttons, and menus.

We will try to identify design principles that can be applied to the de- sign of more advanced interfaces. Also, because Java’s GUI classes pro- vide an excellent example of object-oriented design, we will highlight some of the important design decisions and principles that have influ- enced the development of Java’s GUI classes in both the AWT and Swing. Let’s begin with a brief history Java’s GUI libraries.