Java JLabel setModelValue(JLabel lbl, String value)

Here you can find the source of setModelValue(JLabel lbl, String value)

Description

set Model Value

License

Open Source License

Declaration

protected static void setModelValue(JLabel lbl, String value) 

Method Source Code

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

Related

  1. leftAlignJLabel(JLabel label)
  2. parseIntFromLabel(JLabel jLabel)
  3. setBoundsForJLabel(JLabel label, int xOffset, int yOffset)
  4. setErrorBackground(JLabel comp)
  5. setMnemonic(JLabel label, JComponent message, char mnemonic)
  6. setNSLabel(JLabel nsLabel, String str)
  7. setResultRecordCountColour(JLabel label, boolean limitSet, Integer limitRecords, Integer ActualRecords)
  8. setStatusLabel(JLabel label)
  9. width(JLabel c)