still works in 2024. i wish #tookotek made a validation a changed a scene to the main menu. Basically its a video of establishing db connection and username validation.
Thank for do this amazing video, i learn some concepts today and all worked fine to my project. now i will assist more video that u created. sorry for my inglish, i just a brazilian trying to do something cool, and keep going with your videos.
I did everything but my main class just won't run the window I made in scene builder? It just shows an empty window from the beggining. Maybe I need to update something? I'm using NetBeans 12.0
Hey there Dragan, the main class should atleast have below. Ensure that your "login.fxml" is using the corresponding controller, you can check that in the FMXL or Scene Builder. ... public void start(Stage primaryStage) throws Exception{ Parent root = FXMLLoader.load(getClass().getResource("login.fxml")); primaryStage.setTitle("Hello World"); primaryStage.setScene(new Scene(root, 520, 400)); primaryStage.show(); }
I don't seem to be getting the correct result from my 'String verifyLogin' statement. When I run the query directly, I get a correct result of 1 but when I do it in the I get 0, even though I've validated the connection by having the table details printed to console.
@@tookootek I'm not getting the issue now as I changed my code to be 'String verifyLogin = "SELECT username, password from User";' I think the issue was that it was looping through all the logins stored in the database and I hadn't coded it to stop after a successful hit.
Hi I am using Java 11 which version of Scene Builder should I use? Currently, I have the latest Version downloaded (19.0) and it does not have the "OnAction" to place the Methods." Should I download the version for Java 8 and use. I am also getting an error "Exception in Application start method." ugh. Thoughts?
Hello there! Scene Builder 19 has still have OnAction however please remember that not all objects has OnAction event i.e Button will have it while Label will not. As for Java version / Scenebuilder combination, you can use version that not too far off with each other. There is no universal rule against it except for reasons like potential compatibility issue. As for "Exception in Application start method", can you please check if your fxmlloader have the correct fxml.
@@tookootek bugs found; 1. I had used a “Label” for instead of “Button” for the “Login” ans “Cancel” buttons and thus that why 1. I could fine the “OnAction” in Scene Builder. Secondly, after correcting my error, I created duplicates of “cancelButton” in login.fxml which max my Application Crash giving me that error message. What a Noob. Great lesson in debugging.
@@mastershonobi110 Excellent work! Error is always very much welcome and I personally recommend to work with lots lots of them while they are free. Coding without error is usually good only on production releases but for learning, they are highly recommended whether intentionally done or not. It is part of good learning.
Hello there my friend. Your code is having issue connecting to your database. Please ensure that the DB account you use is working with your local database.
Do you have a method or variable variable named isBlank? If it is a method, ensure you got the name right however if it is variable, ensure it was declared.
Hi Tidus & Rod, You can add sort of "Role" field. One of the simplest is add a new boolean field, i.e isAdmin the value is just between true or false however you can also use string or number type, it totally depends on how many user you have and how much flexible you want it.
Hello bro , just 1 thing, when i run the Select count(1) on sql it displays the 1 but when i put the correct username and password on the little Login window it still says Invalid Login, how do i fix this?
tookootek 1 second ago Hello There Jakuzo! If you just got Invalid Login then this is good, you are able to connect to your DB and Table. The first we can do is try to "Hard Code" the login and password and try to run again. If that works then it means you might just have extra space in between concat either in Username or Password. You can revert back to username and password TextFields once you resolve the issue. Let me know, there are couple of things we can check what went wrong.
I still get the error at 34:18 along side with this error :"Cannot invoke "java.sql.Connection.createStatement()" because "connectDB" is null" even after i add the jar file (lastes version). what can i do pls
Hi Ankel, check your DatabaseConnection.java specifically check getConnection() method under DatabaseConnection class - the variables, login account and connection string you use. It might be just a a simple typo in one of them. ConnectDB is null error just telling you it got nothing from trying to establish that connection when you call getConnection().
Hello there Eoghan, IntelliJ IDEA is a good start for JavaFX using Maven, I don't have one yet but I am pretty sure there are coupe of videos that already tackle this. It should give you a good start
Hello S K! In the DatabaseConnection class, have you filled out the Username and password? if you did, please try to login directly to your database if you get the same error. Getting Access Denied error is excellent, it means you are halfway to successfully connecting. You were able to setup the correct connection string, you just need to have a proper account.
@@tookootek But it closes without validating the username or account, so if I hit the login button it automatically closes even though the account is incorrect
Hey bro! thanks for watching my video, it is in the works but not sure when I can complete and upload it as there is one or two videos ahead of it. But i am hoping soon.
Thanks man for giving me a clue, I will let YT copyright management handle that. There are couple of them that copied my videos by trimming the start and end however YT algorithm is too smart to fall for that. By the way this login screen has another version. Either you saw the first version or the one that was copied and re-uploaded by someone. Happy Learning!
Thanks you for the great lesson ☺️ I can with a question and I need help from you and others following through. What can cause my login UI to freeze and stops responding afterwards and when I kill the the process am getting this error message in my intellij idea terminal: process finished with exit code -805306369 (0x0fffffff) What can cause this error thanks for the help