O'Reilly logo

Java™ How to Program, Seventh Edition by P. J. Deitel - Deitel & Associates, Inc., H. M. Deitel - Deitel & Associates, Inc.

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

11.19. JTextArea

A JTextArea provides an area for manipulating multiple lines of text. Like class JText-Field, JTextArea is a subclass of JTextComponent, which declares common methods for JTextFields, JTextAreas and several other text-based GUI components.

The application in Figs. 11.4711.48 demonstrates JTextAreas. One JTextArea displays text that the user can select. The other JTextArea is uneditable and is used to display the text the user selected in the first JTextArea. Unlike JTextFields, JTextAreas do not have action events. As with multiple-selection JLists (Section 11.12), an external event from another GUI component indicates when to process the text in a JTextArea. For example, when typing an e-mail message, you normally click a ...

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