JAVA - How To Create Login And Register Form With MySQL Database In Java NetBeans

Поділитися
Вставка
  • Опубліковано 22 лис 2024

КОМЕНТАРІ • 44

  • @patson.
    @patson. 8 місяців тому +6

    May God keep blessing all developers who share the source code! You guys are lifesavers! Thank you Elias bro.

  • @TiKea-sz2fm
    @TiKea-sz2fm 10 місяців тому +7

    Thanks a lot, you saved me from my assignments:)

  • @achraftrad249
    @achraftrad249 Місяць тому +2

    If you are workong on many frames you should create connection with database in every class or can you just create a main class and get all data you need for all pages and send it to them ?

    • @CodingwithElias
      @CodingwithElias  Місяць тому

      Good question! For simplicity and learning purposes in this tutorial, I’ve created the database connection in every class. This way, it's easier to understand how each component works independently. However, in larger projects, it's better to use a single connection manager (like a main class) to handle all database interactions. This avoids creating multiple connections, which can be inefficient. Once you're comfortable with the basics, you can explore techniques like the 'singleton pattern' or connection pooling to optimize performance

  • @muhammadzidan3957
    @muhammadzidan3957 6 місяців тому +1

    I'm sorry if my question sounds dumb and the same. I'm a beginner at using Netbeans. Does it use CRUD, MVC, and mysql? Cause I wanna try using this tutorial for my project.

    • @CodingwithElias
      @CodingwithElias  Місяць тому

      Not a dumb question at all! 😊 NetBeans is a great IDE for Java development, and it can definitely be used to implement CRUD operations, MVC architecture, and MySQL database connectivity. In this tutorial, we focus on creating a login and register form using MySQL, which involves basic CRUD operations for user management.
      If you're looking to incorporate MVC into your project, you can structure your code to separate the data handling, user interface, and application logic. This can help make your project more organized and maintainable.

  • @EdgeLordOmen
    @EdgeLordOmen 6 місяців тому

    Thank you for this, I can't any tutorial where and how you can connect your java to mysql database!
    BTW. im using eclipse, where did you get the template base design

  • @andre89044
    @andre89044 Рік тому +3

    You give the best tutorials

  • @imtenko666
    @imtenko666 2 місяці тому

    very helpful, thanks sir!

  • @fongwademanka1804
    @fongwademanka1804 5 місяців тому +1

    thank you Mr. Elias for this piece, I have a worry. I see this error message when I run the code. is it possible to use the code with the version I am using. I really dont want to dowload an older version. please what can I do for it to work?
    Error: LinkageError occurred while loading main class loginandsignup.LoginAndSignUp
    java.lang.UnsupportedClassVersionError: loginandsignup/LoginAndSignUp has been compiled by a more recent version of the Java Runtime (class file version 63.0), this version of the Java Runtime only recognizes class file versions up to 60.0.

    • @CodingwithElias
      @CodingwithElias  Місяць тому

      Thanks for your comment! The UnsupportedClassVersionError indicates that your Java Runtime Environment (JRE) version is older than the version used to compile your code. In your case, it seems like the code was compiled with Java 19 (class file version 63.0), but you’re trying to run it with an older version (Java 16, class file version 60.0).
      Here are a few options to resolve this:
      Update Your JRE: The simplest solution is to update your Java Runtime to the same version used to compile the code (Java 19). You can download it from the official Java website.
      Recompile with an Older Version: If you prefer to stick with your current JRE, you could try recompiling the code with a lower Java version. You can do this in your IDE by setting the project’s JDK to an older version.
      Use Java Version Compatibility: If you're using an IDE like IntelliJ or Eclipse, you can specify the target version for the compiled classes. This allows your code to be compatible with older JRE versions.

  • @kingmoises2033
    @kingmoises2033 8 місяців тому

    bro this video is really helpful but can i ask how to code if i want to insert something like Confirm Password in Sign up java

  • @dendenwis6109
    @dendenwis6109 5 днів тому

    yow bro how can i change the email for mine

  • @dom880
    @dom880 11 місяців тому +1

    can i ask where you got the com.mysql.cj.jdbc.Driver in SignUp class? I'm trying to do it I cant use it. Can you help me?

    • @CodingwithElias
      @CodingwithElias  11 місяців тому +1

      mysql-connector-java:
      The Link is under the description

  • @asadullahkhan264
    @asadullahkhan264 6 місяців тому +1

    🔥🔥🔥

  • @AndreDV07
    @AndreDV07 Рік тому +1

    can you like make it so it accept a specific username and password like username is admin and password is 123456 and Login must only accepts 3 attempts and a pop-up message will display to verify the information. If click Yes, it will display the information from the other form called Display Form. (I'm trying to do this task I got in my computer class and idk how, also we're using netbeans too)

  • @mercyhuzaifa3411
    @mercyhuzaifa3411 2 місяці тому

    This project is javafx based or javaswing?

  • @janwenytube8773
    @janwenytube8773 6 місяців тому

    How about retrieving name of user bro, i followed your code and its working but if i were click a button and it go to new jframe form then if i exit it back to the jframe form that name is display , it dissappear.

  • @danica2540
    @danica2540 6 місяців тому

    Hi bro plss help to connect log in to sql

  • @sabarmartuatamba1660
    @sabarmartuatamba1660 Рік тому

    DOES THIS USE JAVA FX??

  • @janvi_gowda
    @janvi_gowda 8 місяців тому

    hey this was very much helpful video for my mini project , can u help me find wht i have to do for this error -> " Error!com.mysql.cj.jdbc.Driver " this is getting displayed in the output/terminal , when i try running the sign up page , im not getting the pop up message as well. kindly help if there is any way out.

    • @CodingwithElias
      @CodingwithElias  8 місяців тому

      Download the driver the Link is under the description

    • @fernandobaptista8468
      @fernandobaptista8468 8 місяців тому

      Having the same error. Already downloaded the driver and add in libraries

    • @fernandobaptista8468
      @fernandobaptista8468 8 місяців тому

      Well it seems I need to add dependencies (using netbeans 21 and choosen Maven)... Or add the sql declaration in the pom.xml
      Search in youtube for "Aprenda Como Conectar JAVA com BANCO DE DADOS usando JDBC" for in deep explanation about JDBC connection

    • @ivantransfiguracion9506
      @ivantransfiguracion9506 6 місяців тому

      It is also my problem, i already downloaded the driver, put it in my libraries, butI think, the com.mysql.cj.jdbc.Driver is not related to that

  • @MiaLeal-m7b
    @MiaLeal-m7b 8 місяців тому

    Hi bro. Can you please help me. I used your codes but it said “unknown database (mydatabase name)”.

    • @CodingwithElias
      @CodingwithElias  7 місяців тому

      check the spellings , sorry for the delay

  • @mahdi7075
    @mahdi7075 11 місяців тому

    it keeps saying "Error!Communications link failure
    The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server" whenever i run

    • @CS_GOD64
      @CS_GOD64 9 місяців тому

      I had the same issue.
      You need to connect your database.
      At the left side of your netbeans you will see 3 windows:
      Projects|Files|Services
      1. Click on services
      2. Right click on Databases then choose new connection.
      *A pop-up window will open*
      3. Choose MySQL (connector/J driver) then click next
      *It will bring you to a window called: Customization Connection*
      4. Change the Database to: java_users_database
      Then you test the connection.
      If it says connection succeeded then press next.
      Then press next again then finish.
      Now, go to your signupbtn code en search for
      SUrl = "jdbc:MySQL://localhost:3306/java_user_database";
      It should be:
      SUrl = "jdbc:MySQL://localhost:3306/java_users_database";
      He mad a typo and put user instead of users.

  • @afrikana_tech
    @afrikana_tech 6 місяців тому

    thanks for the video

  • @SmitoGamer
    @SmitoGamer Рік тому

    el enlace de github no sirve... me sale esto: This is not the web page you are looking for. 😢

    • @CodingwithElias
      @CodingwithElias  Рік тому +3

      Disculpe las molestias, he solucionado el problema. Gracias por tu comentario

  • @kukkeii9768
    @kukkeii9768 7 місяців тому

    do you have one for a forgot password?

  • @ReynelTuardon
    @ReynelTuardon 8 місяців тому

    Class.forName(className:"com.mysql.cj.jdbc.Driver"); please help me, why i still get an error, i already add in my libraries the connector