newcoder1010 Posted January 16, 2022 Share Posted January 16, 2022 Hello, package application.controller; import com.jfoenix.controls.JFXButton; import com.jfoenix.controls.JFXPasswordField; import com.jfoenix.controls.JFXTextField; import java.net.URL; import java.util.ResourceBundle; import javafx.fxml.FXML; import javafx.scene.Node; import javafx.scene.control.Label; import javafx.scene.layout.AnchorPane; import javafx.event.ActionEvent; public class LoginController { @FXML private ResourceBundle resources; @FXML private URL location; @FXML private AnchorPane mainContainer; @FXML private AnchorPane loginContainer; @FXML private Label label; @FXML private JFXTextField userName; @FXML private JFXPasswordField password; @FXML private JFXButton loginButton; @FXML void initialize() { loginButton // pressing dot after loginButton does not display setOnAction event } } How can I use the setOnAction event for the loginButton? Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now