java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.text.JTextComponent
javax.swing.JTextArea
public class JTextArea extends JTextComponent
| Constructor Summary | 
|---|
JTextArea()
Constructs a new TextArea.  | 
JTextArea(int rows,
          int columns)
Constructs a new empty TextArea with the specified number of rows and columns.  | 
JTextArea(String text)
Constructs a new TextArea with the specified text displayed.  | 
JTextArea(String text,
          int rows,
          int columns)
Constructs a new TextArea with the specified text and number of rows and columns.  | 
| Method Summary | |
|---|---|
 void | 
append(String str)
Appends the given text to the end of the document.  | 
 int | 
getColumns()
Returns the number of columns in the TextArea.  | 
 int | 
getLineCount()
Determines the number of lines contained in the area.  | 
 boolean | 
getLineWrap()
Gets the line-wrapping policy of the text area.  | 
 int | 
getRows()
Returns the number of rows in the TextArea.  | 
 boolean | 
getWrapStyleWord()
Gets the style of wrapping used if the text area is wrapping lines.  | 
 void | 
insert(String str,
       int pos)
Inserts the specified text at the specified position.  | 
 void | 
setColumns(int columns)
Sets the number of columns for this TextArea.  | 
 void | 
setFont(Font f)
Sets the current font.  | 
 void | 
setLineWrap(boolean wrap)
Sets the line-wrapping policy of the text area.  | 
 void | 
setRows(int rows)
Sets the number of rows for this TextArea.  | 
 void | 
setWrapStyleWord(boolean word)
Sets the style of wrapping used if the text area is wrapping lines.  |