0
Hello folks apparently I am trying problem for Scene Builder to see my package controller, file: Loginverification.java and already looked the way and at first it does not seem to be the root cause of the problem.OBS: my operating system is Kali in case it helps and I am in IDE VS CODE and yes I tried in eclipse but then it got worse even to install. Follow the code below:
login fxml
loginverification: package Greentech.login.controller;
import java.lang.reflect.Array;
import javafx.event.Actionevent; import javafx.fxml.FXML; import javafx.scene.control.Button; import javafx.scene.control.Label; import javafx.scene.control.Textfield;
public class Loginverification {
@FXML
private TextField user;
@FXML
private TextField password;
@FXML
private Label errorLabel;
@FXML
private Button submit;
String userValue;
String passValue;
//teste de login com usuario ficticio
String users[] = {"adm", "comun", "teste", "adm2"};
String passwords[] = {"123", "456", "!@#", "abc"};
// Pega o valor dos campos preenchidos na tela de login e
// usa a funcao verifica para ver se correspondem e segue para a proxima tela
// se não aprecera uma tela de erro
@FXML
void submit(ActionEvent event) {
userValue = user.getText();
passValue = user.getText();
verifica(userValue, passValue);
}
public void verifica(String usuario, String senha){
for(int i = 0; i < users.length; i++){
if(userValue == users[i] && passValue == passwords[i]){
} else{
errorLabel.setText("Usuario e/ou senha errado");
}
}
}
}
Welcome! Is there a log error? Or is it a build error? Can you talk more about it?
– leandro.dev