|
@ -2,10 +2,13 @@ package MeinBudgetView; |
|
|
|
|
|
|
|
|
import java.awt.BorderLayout; |
|
|
import java.awt.BorderLayout; |
|
|
import java.awt.EventQueue; |
|
|
import java.awt.EventQueue; |
|
|
|
|
|
import java.awt.Font; |
|
|
|
|
|
import java.awt.Image; |
|
|
|
|
|
|
|
|
import javax.swing.JFrame; |
|
|
import javax.swing.JFrame; |
|
|
import javax.swing.JPanel; |
|
|
import javax.swing.JPanel; |
|
|
import javax.swing.border.EmptyBorder; |
|
|
import javax.swing.border.EmptyBorder; |
|
|
|
|
|
import javax.swing.ImageIcon; |
|
|
import javax.swing.JButton; |
|
|
import javax.swing.JButton; |
|
|
import javax.swing.JPasswordField; |
|
|
import javax.swing.JPasswordField; |
|
|
import javax.swing.JTextField; |
|
|
import javax.swing.JTextField; |
|
@ -27,7 +30,7 @@ public class LoginFrame extends JFrame { |
|
|
try { |
|
|
try { |
|
|
LoginFrame frame = new LoginFrame(); |
|
|
LoginFrame frame = new LoginFrame(); |
|
|
frame.setVisible(true); |
|
|
frame.setVisible(true); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
e.printStackTrace(); |
|
|
e.printStackTrace(); |
|
|
} |
|
|
} |
|
@ -43,30 +46,46 @@ public class LoginFrame extends JFrame { |
|
|
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); |
|
|
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); |
|
|
setBounds(100, 100, 450, 300); |
|
|
setBounds(100, 100, 450, 300); |
|
|
contentPane = new JPanel(); |
|
|
contentPane = new JPanel(); |
|
|
contentPane.setBackground(Color.WHITE); |
|
|
|
|
|
|
|
|
contentPane.setBackground(Color.CYAN); |
|
|
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); |
|
|
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); |
|
|
setContentPane(contentPane); |
|
|
setContentPane(contentPane); |
|
|
contentPane.setLayout(null); |
|
|
contentPane.setLayout(null); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JButton anmelden = new JButton("Anmelden"); |
|
|
JButton anmelden = new JButton("Anmelden"); |
|
|
anmelden.setBounds(182, 168, 97, 23); |
|
|
anmelden.setBounds(182, 168, 97, 23); |
|
|
contentPane.add(anmelden); |
|
|
contentPane.add(anmelden); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
passwordField = new JPasswordField(); |
|
|
passwordField = new JPasswordField(); |
|
|
passwordField.setBounds(147, 137, 132, 20); |
|
|
passwordField.setBounds(147, 137, 132, 20); |
|
|
contentPane.add(passwordField); |
|
|
contentPane.add(passwordField); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
textField = new JTextField(); |
|
|
textField = new JTextField(); |
|
|
textField.setBounds(147, 106, 132, 20); |
|
|
textField.setBounds(147, 106, 132, 20); |
|
|
contentPane.add(textField); |
|
|
contentPane.add(textField); |
|
|
textField.setColumns(10); |
|
|
textField.setColumns(10); |
|
|
|
|
|
|
|
|
|
|
|
JLabel labaelBenutzername = new JLabel("Benutzername:"); |
|
|
|
|
|
labaelBenutzername.setBounds(48, 106, 89, 20); |
|
|
|
|
|
contentPane.add(labaelBenutzername); |
|
|
|
|
|
|
|
|
|
|
|
JLabel labelPassword = new JLabel("Password: "); |
|
|
|
|
|
labelPassword.setBounds(61, 140, 76, 14); |
|
|
|
|
|
contentPane.add(labelPassword); |
|
|
|
|
|
|
|
|
|
|
|
JLabel loginImage = new JLabel(""); |
|
|
|
|
|
loginImage.setBounds(313, 106, 56, 51); |
|
|
|
|
|
Image image1 = new ImageIcon(this.getClass().getResource("/login-icon.png")).getImage(); |
|
|
|
|
|
loginImage.setIcon(new ImageIcon(image1)); |
|
|
|
|
|
loginImage.setFont(new Font("Tahoma", Font.BOLD, 13)); |
|
|
|
|
|
contentPane.add(loginImage); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JLabel lblNewLabel = new JLabel("Benutzername:"); |
|
|
|
|
|
lblNewLabel.setBounds(48, 106, 89, 20); |
|
|
|
|
|
contentPane.add(lblNewLabel); |
|
|
|
|
|
|
|
|
|
|
|
JLabel lblNewLabel_1 = new JLabel("Password: "); |
|
|
|
|
|
lblNewLabel_1.setBounds(61, 140, 76, 14); |
|
|
|
|
|
contentPane.add(lblNewLabel_1); |
|
|
|
|
|
|
|
|
JLabel loginHauptImage = new JLabel(""); |
|
|
|
|
|
loginHauptImage.setBounds(10, 11, 56, 51); |
|
|
|
|
|
Image image2 = new ImageIcon(this.getClass().getResource("/budgetapp.png")).getImage(); |
|
|
|
|
|
loginHauptImage.setIcon(new ImageIcon(image2)); |
|
|
|
|
|
loginHauptImage.setFont(new Font("Tahoma", Font.BOLD, 13)); |
|
|
|
|
|
contentPane.add(loginHauptImage); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |