Figure 6.35 shows all text components that are included in the Swing library. You already saw the three most commonly used components—
JTextArea—in Volume I, Chapter 9. In the following sections, we will introduce the remaining text components. We will also discuss the
JSpinner component that contains a formatted text field together with tiny “up” and “down” buttons to change its contents.
All text components render and edit the data stored in a model object of a class implementing the
Document interface. The