I'm doing a Log In frame. I managed to do a Simple LogIn function and now I got stuck with Multiple LogIn's. I found out that for this I can use HashMap. So I created the HashMap, but after that I'm not sure how to continue. Can somebody help me or give me some hints?
/*HashMap with parametrs */ Map <UserName,Pass> passbyUserName = new HashMap <userName,Passs>(); passbyUserName.put("Tech","TechN"); passbyUserName.put("Sys","SysO"); /*Trying to check if the input from WUserField(JTextField) exists in the HashMap same for the passwordField which is JPasswordField......But Im sure thats it's not correct*/ final boolean containsKey = passbyUserName.containsKey(WUserField); final boolean containsValue = passbyUserName.containsValue(passwordField);
Thx for your help