Chapter 14. Text Components

The AWT provides two components for displaying editable text: TextArea and TextField. The TextField component provides a single line of editable text, and the TextArea component provides a multiline textarea that can be thought of as a miniature text editor.

Before we launch into our discussion concerning these two components, we should point out that although the components are useful in their own right, they can be difficult to extend in a meaningful manner because they are peer-based components. While this is true for all of the AWT's ...

Get Graphic Java™ 1.2, Volume I: AWT, Third Edition 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.