Here you can find the source of setModelValue(JLabel lbl, String value)
protected static void setModelValue(JLabel lbl, 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 ww w . java 2 s. c o m*/ } } 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); } } }