package GUIAnwendungen.Meine_GUI_Chat;

import java.awt.Color;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;

public class View_Hauptfenster extends JFrame{
	private JPanel panel = new JPanel();
	private JLabel begrüsse = new JLabel();
	
	public View_Hauptfenster() {
		panel.setBackground(Color.gray);
		panel.setBounds(10, 10, 300, 300);
		begrüsse.setBounds(10,10,100,30);
		panel.add(begrüsse);
		
		this.setTitle("Das Hauptfenster");
		this.setVisible(false);
		this.setLayout(null);
		this.setSize(700, 700);
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		this.add(panel);
		
	}
	
	public void zeigeBegrüße(String name) {
		begrüsse.setText("Willkommen " + name);
	}
	
	public static void main(String[]args) {
		View_Hauptfenster test = new View_Hauptfenster();
	}

}
