|
|
@ -73,6 +73,11 @@ public class LoginFrame extends JFrame implements ActionListener, KeyListener { |
|
|
|
loginHauptImage.setFont(new Font("Tahoma", Font.BOLD, 13)); |
|
|
|
contentPane.add(loginHauptImage); |
|
|
|
|
|
|
|
JLabel lblNewLabel_1 = new JLabel("F5: exit"); |
|
|
|
lblNewLabel_1.setFont(new Font("Tahoma", Font.BOLD, 11)); |
|
|
|
lblNewLabel_1.setBounds(342, 213, 82, 14); |
|
|
|
contentPane.add(lblNewLabel_1); |
|
|
|
|
|
|
|
this.anmelden.addActionListener(this); |
|
|
|
passwordField.addActionListener(this); |
|
|
|
benutzername.addActionListener(this); |
|
|
@ -114,7 +119,8 @@ public class LoginFrame extends JFrame implements ActionListener, KeyListener { |
|
|
|
public void keyPressed(KeyEvent e) { |
|
|
|
|
|
|
|
if (e.getKeyCode() == KeyEvent.VK_ENTER) { |
|
|
|
if (benutzername.getText().contentEquals(setBenutzername("admin")) && passwordField.getText().equals(setPassword("admin"))) { |
|
|
|
if (benutzername.getText().contentEquals(setBenutzername("admin")) |
|
|
|
&& passwordField.getText().equals(setPassword("admin"))) { |
|
|
|
MeinGui run = new MeinGui(); |
|
|
|
run.setVisible(true); |
|
|
|
} else { |
|
|
@ -124,7 +130,7 @@ public class LoginFrame extends JFrame implements ActionListener, KeyListener { |
|
|
|
if (e.getKeyCode() == KeyEvent.VK_F5) { |
|
|
|
System.exit(0); |
|
|
|
} |
|
|
|
if (e.getKeyCode() == KeyEvent.VK_L) { |
|
|
|
if (e.getKeyCode() == KeyEvent.VK_DELETE) { |
|
|
|
benutzername.setText(benutzernameUndPasswordLeeren()); |
|
|
|
passwordField.setText(benutzernameUndPasswordLeeren()); |
|
|
|
} |
|
|
@ -140,5 +146,4 @@ public class LoginFrame extends JFrame implements ActionListener, KeyListener { |
|
|
|
public static String benutzernameUndPasswordLeeren() { |
|
|
|
return ""; |
|
|
|
} |
|
|
|
|
|
|
|
} |