/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package de.nplusc.izc.tools.baseTools;

/**
 *
 * @author LH
 */

//import com.sun.xml.internal.bind.v2.runtime.unmarshaller.XsiNilLoader; //Woher kam enn der Scheissdreck???
//import expectj.*;
//import java.util.Map;
//import java.util.logging.Level;
//import java.util.logging.Logger;
//import org.apache.commons.io.*;
import javax.swing.*;

/**
 *
 * @author LH
 */
public class Messagers
{

    private static boolean ContState;
    private static JDialog d = new JDialog();
    //private boolean ProcessReturn;
    private static final String ALPHABET = "abcdefghijklmnopqrstuvwxyz";
    private static int logNumber;

    protected Messagers()
    {
        //disabled Constructor
    }


    public static void SingleLineMsg(String msg,String ButtonTxt)
    {
        JPanel p = new JPanel();
        d.setModal(true);
        
        JLabel lblLIne = new javax.swing.JLabel();
        JButton btnOK = new javax.swing.JButton();
        
        
        lblLIne.setText(msg);
        
        btnOK.setText(ButtonTxt);
        btnOK.addActionListener(new java.awt.event.ActionListener()
        {
            public void actionPerformed(java.awt.event.ActionEvent evt)
            {
                btnOKActionPerformed(evt);
            }
        });
        
        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(p);
        p.setLayout(layout);
        layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                .addGap(41, 41, 41)
                .addComponent(lblLIne, javax.swing.GroupLayout.PREFERRED_SIZE, 243, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGroup(layout.createSequentialGroup()
                .addGap(82, 82, 82)
                .addComponent(btnOK, javax.swing.GroupLayout.PREFERRED_SIZE, 156, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(57, Short.MAX_VALUE)));
        layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(54, Short.MAX_VALUE)
                .addComponent(lblLIne)
                .addGap(18, 18, 18)
                .addComponent(btnOK)
                .addGap(20, 20, 20)));
        
        // </editor-fold>
        
        d.add(p);
        
        d.setSize(p.getPreferredSize());
        d.setVisible(true);
        
        //btnNo.setText(btnRight);
        //btnYes.setText(btnLeft);
    }

    
    
    private static void btnOKActionPerformed(java.awt.event.ActionEvent evt)
    {
        hideDialog();
        d = null;
        d = new JDialog();
    }
    public static void hideDialog()
    {
        d.setVisible(false);
    }
    
}
