I. GUI Components and Event Handling

Objectives

In this appendix you’ll learn:

• How to use Java’s cross-platform Nimbus look-and-feel.

• To build GUIs and handle events generated by user interactions with GUIs.

• To use nested classes and anonymous inner classes to implement event handlers.

Outline

I.1 Introduction

I.2 Nimbus Look-and-Feel

I.3 Text Fields and an Introduction to Event Handling with Nested Classes

I.4 Common GUI Event Types and Listener Interfaces

I.5 How Event Handling Works

I.6 JButton

I.7 JComboBox; Using an Anonymous Inner Class for Event Handling

I.8 Adapter Classes

I.9 Wrap-Up

Self-Review Exercises | Answers to Self-Review Exercises | Exercises

I.1. Introduction

A graphical user interface (GUI) presents a user-friendly mechanism ...

Get Android How to Program now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.