Here you can find the source of appendNewLine(final JTextArea textArea, final String line)
Parameter | Description |
---|---|
textArea | text area to append to |
line | line to be appended |
public static void appendNewLine(final JTextArea textArea, final String line)
//package com.java2s; //License from project: Apache License import javax.swing.JTextArea; public class Main { /**/*from w w w . j a v a 2 s. c o m*/ * Appends a line and a new line to a text area. * @param textArea text area to append to * @param line line to be appended */ public static void appendNewLine(final JTextArea textArea, final String line) { textArea.append(line); textArea.append("\n"); textArea.setCaretPosition(textArea.getDocument().getLength()); } }