Java JComponent Color createTextArea(String str, Color color)

Here you can find the source of createTextArea(String str, Color color)

Description

create Text Area

License

Open Source License

Declaration

public static JTextArea createTextArea(String str, Color color) 

Method Source Code

//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;
    }
}

Related

  1. createDisabledTextComponent (String text, Color color, boolean textField)
  2. createDisabledTextField (String text, Color color)
  3. createHorizontalLine(Color background)
  4. createLabel(final String label, final int alignment, final Color background, final Color foreground)
  5. createLabel(JComponent parent, String text, Color color)
  6. findPanel(JColorChooser chooser, String name)
  7. fixOsxColorChooser(JColorChooser chooser)
  8. flashMessage(final Window parent, String string, Color background, Color foreground, final long howLong)
  9. highlightForDebugging(JComponent component, Color color)