/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package adgsyncms.repository;

import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JTextArea;

/**
 *
 * @author amartinez
 */
public class message {

    public static JLabel _JLabel;
    public static JTextArea _jTextArea;

    public static void show(final String _message) {

        JOptionPane.showMessageDialog(null, _message);

    }

    public static void setMessage(JTextArea jText1, String _message) {
        jText1.setEditable(true);
        String current_message = jText1.getText();

        if (current_message.trim().length() > 0) {
            current_message += "\n";
        }
        //set message
        _message = current_message + _message;
        //set message
        jText1.setText(_message);
        jText1.setEditable(false);
    }

    public static void setLabelMessage(String _message) {
        _JLabel.setText(_message);
    }

    public static void setCaption(JLabel lbl, String sCaption) {
        try {
            lbl.setText(sCaption);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
