hi. I get a NillpointerException.
Here's my code:
private void Login_ButtonMouseClicked(java.awt.event.MouseEvent evt) {
String usrname = uname_TextField.getText();
String pass = passwd_PasswordField.getText();
String pwrd = pass.toString();
String args[] = null;
boolean auth_flag = false;
try{
R = S.executeQuery("select uname, passwrd from Employee_Master;");
while(R.next()){
if(usrname.equals(R.getString("uname"))){
if(pwrd.equals(R.getString("passwrd"))){
this.dispose();
[B]args[0] = R.getString("uname")[/B]//causing nullpointerexception
Modules_Frame.main(args);
.
.
public class Modules_Frame extends javax.swing.JFrame {
.
.
public static void main(final String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new Modules_Frame(args).setVisible(true);
}
});
}
Wats the problem?
Thanks.