+ 3
If there someone tell me how to set password and username for my login interface which i made using scenebulider , netbeans IDE.
4 ответов
+ 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}
+ 2
just take user entered data onclick event of a button and compare it with predefined strings using simple if condition.
+ 2
how to do it. explain in javafx
+ 1
hsha