Answer the question
In order to leave comments, you need to log in
Why doesn't Thread.sleep work?
public class Controller implements Initializable
{
public static String login = "EVA";
@FXML
private Button btn;
@FXML
private TextField loginfield;
@FXML
private Label result;
public void initialize(URL fxmlFileLocation, ResourceBundle resources)
{
loginfield.setStyle("-fx-font: 25 calibri");
btn.setOnAction(
event ->
{
if (loginfield.getText().equals(login))
{
result.setText("Your login is right");
result.setText("Logged in");
}
else if (loginfield.getText().isEmpty())
{
result.setText("You have typed nothing");
}
else if (loginfield.getText() != login)
{
result.setText("Your login isn't right");
}
}
);
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question