Contents

Swinging Duke
Feedback Button
Left ArrowRight Arrow

 

The JTextArea API

 

This specification describes the JTextArea class, which provides the the Java AWT TextArea class with added functionality using Swing architecture.

This API adds two new methods -- getColumnWidth() and getRowHeight() -- to the JTextArea class. Also, two old methods -- getPreferredSize() and getMinimumSize() -- are no longer in the API because it has been determined that they should have protected or private access specifiers.

In the Swing version of the TextArea class, the notion of a desired number of columns still exists for compatibility, but its meaning is more controllable. The width of a column is now defined by the getColumnWidth() method. By default, this method produces the character width of the letter m. It can be redefined to be a different value. For symmetry, the height of a row can be changed by redefining the getRowHeight() method. By default, this value is defined as the height of the current font.


The API

The JTextArea API is generated by JavaDoc. It contains the bulk of the specification.

Arrows


Version 0.5. Last modified 09/04/97.
Copyright © 1995-97 Sun Microsystems, Inc. All Rights Reserved.

Sun's Home Page