Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package login;
- import java.net.URL;
- import java.util.ResourceBundle;
- import javafx.event.ActionEvent;
- import javafx.fxml.FXML;
- import javafx.fxml.Initializable;
- import javafx.scene.control.PasswordField;
- import javafx.scene.control.TextArea;
- import javafx.scene.control.TextField;
- import javafx.scene.layout.AnchorPane;
- /**
- * FXML Controller class
- *
- * @author jackcoode
- */
- publpublic class FXMLDocumentController {
- @FXML
- private AnchorPane AnchorPane;
- @FXML
- private TextField usernamebx;
- @FXML
- private PasswordField passwordbx;
- @FXML
- private TextArea resultbx;
- @FXML
- private void Login(ActionEvent event) {
- if (usernamebx.getText().equals("HManager") && passwordbx.getText().equals("password")){
- resultbx.setText("Login Success");
- }
- else{
- resultbx.setText("Login Failed");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement