I need to create a system that checks a file for the username and password and if it is correct, it says whether or not in a label. So far I have been able to simply make one username and password equal to the variable, but need to link it to a file somehow..
String user_pass;
String user_name;
user_name= txtUser.getText().tostring();
user_pass= txtPass.getText().tostring();
if( user_name.equals("mube123") && user_pass.equals("mubarik") ){
lblDisplay.setText("Credentials Accepted.");
}
else{
lblDisplay.setText("Please try again.");
}