TextField and TextArea both extend the TextComponent class. TextComponent, as a matter of fact, exists solely to provide fundamental text editing capabilities for TextArea and TextField.
As evidenced by the class diagram in Figure 14-1, TextComponent provides the following functionality:
Figure 14-1. TextComponent Class Diagram. TextComponent maintains text, selection range, and editability of the component. TextComponent cannot be instantiated by classes outside the java.awt package.
Get and set text
Get and set selected text
Get and set editable mode
Position the insertion caret