Advertisement
Guest User

Untitled

a guest
Feb 25th, 2020
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package login;
  7.  
  8. import java.net.URL;
  9. import java.util.ResourceBundle;
  10. import javafx.event.ActionEvent;
  11. import javafx.fxml.FXML;
  12. import javafx.fxml.Initializable;
  13. import javafx.scene.control.PasswordField;
  14. import javafx.scene.control.TextArea;
  15. import javafx.scene.control.TextField;
  16. import javafx.scene.layout.AnchorPane;
  17.  
  18. /**
  19. * FXML Controller class
  20. *
  21. * @author jackcoode
  22. */
  23. publpublic class FXMLDocumentController {
  24.  
  25. @FXML
  26. private AnchorPane AnchorPane;
  27. @FXML
  28. private TextField usernamebx;
  29. @FXML
  30. private PasswordField passwordbx;
  31. @FXML
  32. private TextArea resultbx;
  33.  
  34.  
  35. @FXML
  36. private void Login(ActionEvent event) {
  37. if (usernamebx.getText().equals("HManager") && passwordbx.getText().equals("password")){
  38. resultbx.setText("Login Success");
  39. }
  40. else{
  41. resultbx.setText("Login Failed");
  42. }
  43. }
  44.  
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement