Here you can find the source of createTextArea(String str, Color color)
public static JTextArea createTextArea(String str, Color color)
//package com.java2s; // it under the terms of the GNU General Public License as published by import java.awt.Color; import javax.swing.JTextArea; public class Main { public static JTextArea createTextArea(String str, Color color) { JTextArea desc = new JTextArea(str); desc.setBackground(color);// w w w . j a va 2 s . com desc.setEditable(false); desc.setCaretColor(color); desc.setLineWrap(true); desc.setWrapStyleWord(true); return desc; } }