I am creating a simple login application in java netbeans. I have made a connection with a MS-Access database in which i am storing the usernames and their passwords.
Suppose is i want to get text from a JTextField, i would use an object of PrepareStatement for the query. For Example 'ps' is the object of PrepareStatement, now to get text from JTextField i write statement,
Just create a new
String from the
ps.setString(1, new String(jPasswordField.getPassword()));