0
Javax swing
please I need help with my Javax swing project I created a log in interface where it requires password to login it is working out fine except for the fact that it logs in once the username and password field are empty
12 Antworten
+ 2
To action listener of login button add a condition:
if(loginField.getText()!="" || passwordField.getText()!=""){
//login instruction
}
So it wont work with empty fields.
+ 1
Are you using jdbc drivers? What is your query for validating login? Remember to have "not null" atributes in table model. (checkout if you do not have empty records in db) If you want code review, share project on github and I'll help you.
Also you can checkout my last mini project where we get working swing login using mysql.
github.com/JOogway/hack
0
This problem is going to be tough to understand without code.
0
how can I send the screen shots?
0
How many files is it?
0
just one
0
if it's just one file then dump it in SL Java Code Playground, save it as public and then post the link here.
0
I don't have a Java compiler but will try to see what I can figure out in the code.
0
what listener is it registered for?
0
that code didn't work
0
and I already have a database
0
thanks I got it