No I have not seen that tutorial yet. I have used Netbeans to create the connection so the code is automatically created and it works because I can see the list of tables in the left hand box(on the
IDE). I have code for when the user clicks the login button(i'm not at work so I cannot exactly recreate the code). i use a password text box for the password.
String strusername = "";
String pwspassword = "";
int x = 0;
chr[] chrpassword;//probably not he exact code don't remember
strusername = jtxtusername.getText();
//here i will check for username, if not correct give error and clear //txtboxes
chrpassword = jpwdpassword.getText();
for(int i:chrpassword){
strpassword = strpassword + chrpassword[x];
x++;
//here I will query the DB for check for password
}
I am also getting help on netbeans forum and they gave me code to do it, but it's a class and I think netbeans have created one for me since I have setup the entity manager in netbeans.