package BankSystemGUI;

import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import java.awt.Color;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.JButton;
import javax.swing.border.LineBorder;

public class HauptFenser extends JFrame {

	private static final long serialVersionUID = 1L;
	private JPanel contentPane;
	JLabel kontostand;
	JLabel user_Name;
	JButton einzahlen;
	JButton auszahlen;
	JButton ueberweisen;
	
	public HauptFenser() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 913, 681);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));

		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JPanel panel = new JPanel();
		panel.setBorder(new LineBorder(new Color(0, 0, 128)));
		panel.setBackground(new Color(219, 219, 219));
		panel.setBounds(99, 51, 595, 495);
		contentPane.add(panel);
		panel.setLayout(null);
		
		JLabel lblNewLabel = new JLabel("Willkommen ");
		lblNewLabel.setForeground(new Color(255, 0, 128));
		lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 18));
		lblNewLabel.setBounds(46, 38, 169, 65);
		panel.add(lblNewLabel);
		
		JLabel kontosatnd_text = new JLabel("KontoStand: ");
		kontosatnd_text.setFont(new Font("Tahoma", Font.BOLD, 18));
		kontosatnd_text.setBounds(46, 189, 164, 65);
		panel.add(kontosatnd_text);
		
		kontostand = new JLabel("");
		kontostand.setFont(new Font("Tahoma", Font.PLAIN, 15));
		kontostand.setBounds(178, 192, 300, 65);
		panel.add(kontostand);
		
		user_Name = new JLabel("");
		user_Name.setForeground(new Color(0, 0, 0));
		user_Name.setFont(new Font("Tahoma", Font.BOLD, 16));
		user_Name.setBounds(178, 55, 277, 37);
		panel.add(user_Name);
		
		einzahlen = new JButton("Einzahlen");
		einzahlen.setFont(new Font("Tahoma", Font.PLAIN, 14));
		einzahlen.setBounds(24, 349, 169, 58);
		panel.add(einzahlen);
		
		auszahlen = new JButton("Auszahlen");
		auszahlen.setFont(new Font("Tahoma", Font.PLAIN, 15));
		auszahlen.setBounds(225, 349, 169, 58);
		panel.add(auszahlen);
		
		ueberweisen = new JButton("Überweisen");
		ueberweisen.setFont(new Font("Tahoma", Font.PLAIN, 15));
		ueberweisen.setBounds(416, 349, 169, 58);
		panel.add(ueberweisen);
	}

	public void zeige_HauptFenster() {
		this.setVisible(true);
	}
	
	public void schließe_hauptFenster() {
		this.setVisible(false);
	}
	
	public void set_user_name(String name) {
		user_Name.setText(name);
	}
	
	public String getUsername() {
		return user_Name.getText();
	}
	
	public void set_user_kontostand(double kontostand_user) {
		kontostand.setText(kontostand_user + "");
	}
	
	public String getUserkontostand() {
		return kontostand.getText();
	}

	public JButton getEinzahlen() {
		return einzahlen;
	}

	public JButton getAuszahlen() {
		return auszahlen;
	}

	public JButton getUeberweisen() {
		return ueberweisen;
	}
	
	
	
	

}
