34 lines
1.0 KiB
Java
34 lines
1.0 KiB
Java
package com.bib.essensbestellungsverwaltung;
|
|
|
|
import javafx.fxml.FXML;
|
|
import javafx.scene.control.Alert;
|
|
import javafx.scene.control.Label;
|
|
import javafx.scene.control.TextField;
|
|
|
|
public class HelloController {
|
|
/**
|
|
* @autor: Reshad Meher
|
|
* Username, Passwort , login
|
|
*/
|
|
|
|
@FXML
|
|
private TextField unsernameEingabe;
|
|
@FXML
|
|
private TextField passwortEingabe;
|
|
@FXML
|
|
private Label lblAusgabe;
|
|
@FXML
|
|
protected void onLoginButtonClick() {
|
|
String benutzerEingabe = unsernameEingabe.getText();
|
|
String kennwortEingabe = passwortEingabe.getText();
|
|
if(benutzerEingabe.contains("Reshad") && kennwortEingabe.contains("test123")){
|
|
lblAusgabe.setText("Herzlich Willkommen, " + benutzerEingabe + "!");
|
|
}else {
|
|
Alert alert = new Alert(Alert.AlertType.ERROR,
|
|
"Die Benutzername oder Passwort ist falsch");
|
|
alert.showAndWait();
|
|
}
|
|
unsernameEingabe.setText("");
|
|
passwortEingabe.setText("");
|
|
}
|
|
} |