A JTextArea provides an area for manipulating multiple lines of text. Like class
JTextArea is a subclass of
JTextComponent, which declares common methods for
JTextAreas and several other text-based GUI components.
The application in Figs. 12.47–12.48 demonstrates
JTextArea displays text that the user can select. The other is uneditable by the user and is used to display the text the user selected in the first
JTextAreas do not have action events—when you press Enter while typing in a
JTextArea, the cursor simply moves to the next line. As with multiple-selection
JLists (Section 12.13), an external event from another GUI component indicates when to process ...