📄 jtextarea.html
字号:
<BR> Constructs a new empty TextArea with the specified number of rows and columns.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../javax/swing/JTextArea.html#JTextArea(java.lang.String)">JTextArea</A></B>(<A HREF="../../java/lang/String.html">String</A> text)</CODE><BR> Constructs a new TextArea with the specified text displayed.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../javax/swing/JTextArea.html#JTextArea(java.lang.String, int, int)">JTextArea</A></B>(<A HREF="../../java/lang/String.html">String</A> text, int rows, int columns)</CODE><BR> Constructs a new TextArea with the specified text and number of rows and columns.</TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTextArea.html#append(java.lang.String)">append</A></B>(<A HREF="../../java/lang/String.html">String</A> str)</CODE><BR> Appends the given text to the end of the document.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../javax/swing/text/Document.html">Document</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTextArea.html#createDefaultModel()">createDefaultModel</A></B>()</CODE><BR> Creates the default implementation of the model to be used at construction if one isn't explicitly given.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../javax/accessibility/AccessibleContext.html">AccessibleContext</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTextArea.html#getAccessibleContext()">getAccessibleContext</A></B>()</CODE><BR> Gets the AccessibleContext associated with this JTextArea.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTextArea.html#getColumns()">getColumns</A></B>()</CODE><BR> Returns the number of columns in the TextArea.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected int</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTextArea.html#getColumnWidth()">getColumnWidth</A></B>()</CODE><BR> Gets column width.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTextArea.html#getLineCount()">getLineCount</A></B>()</CODE><BR> Determines the number of lines contained in the area.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTextArea.html#getLineEndOffset(int)">getLineEndOffset</A></B>(int line)</CODE><BR> Determines the offset of the end of the given line.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTextArea.html#getLineOfOffset(int)">getLineOfOffset</A></B>(int offset)</CODE><BR> Translates an offset into the components text to a line number.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTextArea.html#getLineStartOffset(int)">getLineStartOffset</A></B>(int line)</CODE><BR> Determines the offset of the start of the given line.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTextArea.html#getLineWrap()">getLineWrap</A></B>()</CODE><BR> Gets the line-wrapping policy of the text area.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/awt/Dimension.html">Dimension</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTextArea.html#getPreferredScrollableViewportSize()">getPreferredScrollableViewportSize</A></B>()</CODE><BR> Returns the preferred size of the viewport if this component is embedded in a JScrollPane.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/awt/Dimension.html">Dimension</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTextArea.html#getPreferredSize()">getPreferredSize</A></B>()</CODE><BR> Returns the preferred size of the TextArea.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected int</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JTextArea.html#getRowHeight()">getRowHeight</A></B>()</CODE><BR> Defines the meaning of the height of a row.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -