|
@ -88,8 +88,8 @@ public class LoginFrame extends JFrame implements ActionListener, KeyListener { |
|
|
&& (benutzername.getText().length() == 0 || passwordField.getText().length() == 0)) { |
|
|
&& (benutzername.getText().length() == 0 || passwordField.getText().length() == 0)) { |
|
|
JOptionPane.showMessageDialog(anmelden, "Bitte geben Sie die richtigen Daten ein!"); |
|
|
JOptionPane.showMessageDialog(anmelden, "Bitte geben Sie die richtigen Daten ein!"); |
|
|
} |
|
|
} |
|
|
if (ae.getSource() == this.anmelden && benutzername.getText().length() > 0 |
|
|
|
|
|
&& passwordField.getText().length() > 0) { |
|
|
|
|
|
|
|
|
if (ae.getSource() == this.anmelden && benutzername.getText() != setBenutzername("admin") |
|
|
|
|
|
&& passwordField.getText() != setPassword("admin")) { |
|
|
MeinGui run = new MeinGui(); |
|
|
MeinGui run = new MeinGui(); |
|
|
run.setVisible(true); |
|
|
run.setVisible(true); |
|
|
|
|
|
|
|
@ -114,7 +114,7 @@ public class LoginFrame extends JFrame implements ActionListener, KeyListener { |
|
|
public void keyPressed(KeyEvent e) { |
|
|
public void keyPressed(KeyEvent e) { |
|
|
|
|
|
|
|
|
if (e.getKeyCode() == KeyEvent.VK_ENTER) { |
|
|
if (e.getKeyCode() == KeyEvent.VK_ENTER) { |
|
|
if (benutzername.getText().length() > 0 && passwordField.getText().length() > 0) { |
|
|
|
|
|
|
|
|
if (benutzername.getText().contentEquals(setBenutzername("admin")) && passwordField.getText().equals(setPassword("admin"))) { |
|
|
MeinGui run = new MeinGui(); |
|
|
MeinGui run = new MeinGui(); |
|
|
run.setVisible(true); |
|
|
run.setVisible(true); |
|
|
} else { |
|
|
} else { |
|
|