Here you can find the source of setModelValue(JTextArea ta, String value)
protected static void setModelValue(JTextArea ta, String value)
//package com.java2s; //License from project: Open Source License import javax.swing.JLabel; import javax.swing.JTextArea; import javax.swing.JTextField; public class Main { protected static void setModelValue(JTextField tf, String value) { if (value != null) { tf.setText(value);//from w w w. j av a 2 s . c om } } protected static void setModelValue(JTextArea ta, String value) { if (value != null) { ta.setText(value); } } protected static void setModelValue(JLabel lbl, String value) { if (value != null) { lbl.setText(value); } } }