Hello! I’ve been struggling with creating a Java program which displays a login form.Basically, I want to retreive a database which contains about users and their password. At this moment, I am at the point where I need to display an error message using jOptionPane, but it seems like not working. When I run the file and I click Login button, nothing is displayed.
Carey Brown wrote:This is from the JOptionPane docs:
It uses null for a parent and specifies that it is an error dialog.
I typed it, nothing works. However, if I use the code that you provided me with, on a distinct JForm, clicking the so-called Login button retreives the necessary result. Therefore, it might be a problem with the code that indicates the connection with MySql Database. What do you think?
posted 1 month ago
I found out what the problem is: the server cannot connect to the MySql database. Basically, the code is not properly run because of the lack of connection. Well, I try to connect to the database, but I am prompted with the following error (in the attachement). The paths seem to be correct, but still I cannot connect to the DB. What can I do?