My aim is to create a small javafx application that makes use of javafx forms (handled by separate java classes) for example: Login.fx (GUI) calls methods from LoginFunc.java. to handle user interactions.
My problem is that I need to pass the username and password entered by the user to LoginFunc. Usually in swing applications i use a constructor such as
public LoginFunc (String username, String password) { }
How can I call such a class from a javafx file? my current code is:
function btnLoginAction(): Void { var username: String; var password: String; var login: LoginFunc;
username = txtUsername.text;
password = txtPassword.text;
}
Any help is appreciated!