+ 3

If there someone tell me how to set password and username for my login interface which i made using scenebulider , netbeans IDE.

30th Jun 2018, 12:04 PM
Harendra Keshawa
Harendra Keshawa - avatar
4 odpowiedzi
+ 6
code on Login button: //Let Username textfield be jtextfield1 and password be jpasswordfield1 . String uname="Required_Username", pass="Required_Password", username=jTextField1.getText(), password= new String(jPasswordField1.getPassword); // uname and pass is the username and password you want to use as a standard. username and password are variables which you will receive as input. if (username.equals(uname)&& password.equals(pass)) { // what you want to display} else {//what you want to display}
1st Jul 2018, 6:12 AM
Siddharth Golecha
Siddharth Golecha - avatar
+ 2
just take user entered data onclick event of a button and compare it with predefined strings using simple if condition.
30th Jun 2018, 9:55 PM
#DARK_PROGRAMMER_✔
#DARK_PROGRAMMER_✔ - avatar
+ 2
how to do it. explain in javafx
30th Jun 2018, 11:42 PM
Harendra Keshawa
Harendra Keshawa - avatar
+ 1
hsha
1st Jul 2018, 4:31 PM
Sagar Rawal
Sagar Rawal - avatar