O'Reilly logo

Core Java® Volume II—Advanced Features, Ninth Edition by Gary Cornell, Cay S. Horstmann

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

6.4. Text Components

Figure 6.35 shows all text components that are included in the Swing library. You already saw the three most commonly used components—JTextField, JPasswordField, and 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.

Image

Figure 6.35. The hierarchy of text components and documents

All text components render and edit the data stored in a model object of a class implementing the Document interface. The JTextField and JTextArea ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required