I would appreciate some help, I am building a Java Application using Netbeans 5.5 and a Ms SQL Server 2000 database. It is a program for a Video Store.
I am busy with an edit interface where the user can add a genre or movie or delete a movie from the database. But I need to make the user enter a username and password before any editing can be done.
I've created a JtextField for the USERNAME and a JPasswordField for the PASSWORD. I am trying to match the USERNAME and PASSWORD against the database.
The program does not return any errors, but if I press Login nothing happens. This is the part for the Login Screen:
String data = "jdbcdbc:VideoStore";
is where the action happens for the login.
I know it is not very secure but this is only a project for school, I just need it to be able to login.
Is the jButton1ActionPerformed method being called?
Joined: Jun 23, 2009
Hi Ulf I am not sure what you mean, I have added an event ActionPerformed to jButton1 and written the database connection code inside the event.
Is that the correct way?
Joined: Mar 22, 2005
Well, it doesn't matter what's inside the action listener if it's not being run for some reason :-) Put a System.out.println statement at the beginning of the jButton1ActionPerformed method to check if it's actually being called.