package jguard.client.gui.dialog;

import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JPanel;


public class ServerMessageDialog extends JDialog {
    
    private String text;

    public ServerMessageDialog(String text) {
        
        this.text = text;
        
        
        placeComponents();
    }

    private void placeComponents() {
        
        setTitle("Zpráva serveru");
        
        setSize(400,300); 
        
        setLocationRelativeTo(null);
        
        setAlwaysOnTop(true);
        
        JPanel panel = new JPanel();
        
        JLabel l = new JLabel(text); 
        
        panel.add(l);
        
        this.add(panel);
        
        this.setVisible(true);
        
    }
    
    
}
