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

7th Jun 2017, 11:59 AM
rhymegest
rhymegest - avatar
12 odpowiedzi
+ 2
To action listener of login button add a condition: if(loginField.getText()!="" || passwordField.getText()!=""){ //login instruction } So it wont work with empty fields.
7th Jun 2017, 12:28 PM
Maksym Zieliński
Maksym Zieliński - avatar
+ 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
7th Jun 2017, 9:04 PM
Maksym Zieliński
Maksym Zieliński - avatar
0
This problem is going to be tough to understand without code.
7th Jun 2017, 12:13 PM
Milind
Milind - avatar
0
how can I send the screen shots?
7th Jun 2017, 12:19 PM
rhymegest
rhymegest - avatar
0
How many files is it?
7th Jun 2017, 12:20 PM
Milind
Milind - avatar
0
just one
7th Jun 2017, 12:23 PM
rhymegest
rhymegest - avatar
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.
7th Jun 2017, 12:24 PM
Milind
Milind - avatar
0
I don't have a Java compiler but will try to see what I can figure out in the code.
7th Jun 2017, 12:30 PM
Milind
Milind - avatar
0
what listener is it registered for?
7th Jun 2017, 12:32 PM
Milind
Milind - avatar
0
that code didn't work
7th Jun 2017, 3:28 PM
rhymegest
rhymegest - avatar
0
and I already have a database
7th Jun 2017, 3:28 PM
rhymegest
rhymegest - avatar
0
thanks I got it
10th Jun 2017, 9:23 PM
rhymegest
rhymegest - avatar