Тёмный
No video :(

JavaFX Tutorial | Login Screen with database connection (2021) 

tookootek
Подписаться 3,5 тыс.
Просмотров 65 тыс.
50% 1

Опубликовано:

 

21 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 80   
@mailsonalves6945
@mailsonalves6945 7 месяцев назад
I usually don't comment on videos, but this one deserves, congratulations for this content, very helpful!
@BibaBoba2D
@BibaBoba2D 2 месяца назад
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.
@luisdavidmora5868
@luisdavidmora5868 3 месяца назад
Bro, two years later and this video is amazing, thank you
@simplebutamazing3613
@simplebutamazing3613 Год назад
After three days of suffering over this video, I have finally done it. Tysm!
@tookootek
@tookootek Год назад
Welcome to coding world! May sometimes frustrating but so rewarding once you've make it work!
@saltysnot
@saltysnot 2 года назад
Thank for making this video I love how straight to the point you are with your tutorials! Saves me a ton of time!
@karlamariafelix6566
@karlamariafelix6566 3 года назад
Came here from a question I had from other of your videos. Thank you so much it helped me to notice my error. Amazing videos!!
@tookootek
@tookootek 3 года назад
You're Welcome! Thanks Karla. Enjoy and keep on coding!
@mikaelmahamat5988
@mikaelmahamat5988 2 года назад
Excellent Teaching method ...Respect
@PurpleSweetObsessions
@PurpleSweetObsessions 3 года назад
Watching with my hubby.. This reminds me of my collage days, learning vb6
@tookootek
@tookootek 3 года назад
Love to hear that!
@samusnews
@samusnews Год назад
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.
@tookootek
@tookootek Год назад
You are welcome! Keep on coding!
@sahlofolina4444
@sahlofolina4444 Год назад
thanks a lot!!! helped me with my assignment and exam.
@tookootek
@tookootek Год назад
Glad it helped!
@DonCrafts1
@DonCrafts1 2 года назад
Thanks a lot!!! Helped me!
@draganbjelica9013
@draganbjelica9013 2 года назад
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
@tookootek
@tookootek 2 года назад
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(); }
@eduardaalves2272
@eduardaalves2272 3 года назад
Thank you very much for your help!
@tookootek
@tookootek 3 года назад
You're welcome!
@JohnRehill
@JohnRehill Год назад
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
@tookootek Год назад
Hey John are you still having this issue? can you share your String here?
@JohnRehill
@JohnRehill Год назад
@@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.
@tookootek
@tookootek Год назад
@@JohnRehill good job! The thrill of debugging lives on! Keep it up my friend, you are in the right track.
@CindyHyunPH
@CindyHyunPH 3 года назад
Nice tutorial
@mastershonobi110
@mastershonobi110 Год назад
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?
@tookootek
@tookootek Год назад
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.
@mastershonobi110
@mastershonobi110 Год назад
@@tookootek I will check and let you know. I am really enjoying your vids. Ty for responding; I appreciate it.
@mastershonobi110
@mastershonobi110 Год назад
@@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.
@tookootek
@tookootek Год назад
@@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.
@mastershonobi110
@mastershonobi110 Год назад
Hi, how do I have the components resize automatic using Scene Builder when I maximize the UI? How can I make it “auto size” when the UI is stretched?
@itachicodes2506
@itachicodes2506 2 года назад
why cant I see the image? I checked and my fxml file is good and the directories as well
@hassnainalidayo5433
@hassnainalidayo5433 2 года назад
Aslam o alaikum sir, Whenever I run program it display error " Access denied for user @ local host ' using password :no" Any solution??
@tookootek
@tookootek Год назад
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.
@botheredspinx7947
@botheredspinx7947 Год назад
ERES UN GRANDEEEEEEEEEE, LIKE Y SUB
@UltramateSL
@UltramateSL 4 месяца назад
Thank you
@pinguinpeng
@pinguinpeng Год назад
cannot resolve class "sampleController" edit: its fixed was a small issue but now its telling me it cannot find symbol isBlank()
@tookootek
@tookootek Год назад
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.
@pinguinpeng
@pinguinpeng Год назад
@@tookootek i used isempty instead it works but ill try to fix it thank you im trying to setup the database rn amazing video btw.
@ilfanza9679
@ilfanza9679 Год назад
u absolutely komeng
@muhammadhilmitaufiqulhakim1571
Thanks komang we all love you so much :***
@alucard4702
@alucard4702 3 года назад
Plugin 'org.apache.maven.plugins:maven-compiler-plugin:3.8.1' not found how to fix it?
@ilfanza9679
@ilfanza9679 Год назад
bro are u komang saputra?
@tidusrod9652
@tidusrod9652 2 года назад
Hi everyone how to differentiate between a user and an admnin when logging in?
@tookootek
@tookootek 2 года назад
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.
@tookootek
@tookootek 2 года назад
Using the "role" field, you can control what level of access the user will have or what functionality will going to be available
@tidusrod9652
@tidusrod9652 2 года назад
@@tookootek Thank you very very very much, helpfull !!!! :)
@alexyaa5598
@alexyaa5598 2 года назад
URI is not registered (Settings | Languages & Frameworks | Schemas and DTDs), how can I solve this ? At the end of part 2.
@angilstech
@angilstech 2 года назад
Check this if it can help you can as well share link ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-QsTOAXAtdrM.html
@kevinllaca
@kevinllaca Год назад
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
@tookootek Год назад
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.
@hamzaomari7052
@hamzaomari7052 2 года назад
Thank you so much sir. You really helped me so much on doing this. Thank you again sir!
@Zureveld
@Zureveld 8 месяцев назад
does anyone know where to download javaf sdk?
@phongmachan3509
@phongmachan3509 3 года назад
can you tutorial about hibernate ?
@ankel4346
@ankel4346 Год назад
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
@tookootek
@tookootek Год назад
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().
@gilbertcabigasalmazan3289
@gilbertcabigasalmazan3289 2 года назад
How to make it so that when its. resized to full screen the components stays on middle of anchor pane?
@khlifazeidane3750
@khlifazeidane3750 Год назад
did you find out how ? i'm struggrling to find out
@eoghanfeighery7383
@eoghanfeighery7383 Год назад
What are the maven ide plugins that you recommend for this?
@tookootek
@tookootek Год назад
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
@SypEX-vz3ui
@SypEX-vz3ui 3 года назад
at the end when i click login i get following error: SQLException: Access denied for user 'whatever'@'localhost'
@tookootek
@tookootek 3 года назад
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.
@SypEX-vz3ui
@SypEX-vz3ui 3 года назад
@@tookootek i found the mistake. i added a new user to the table UserAccount and tried to login with it. Then i used my root account and it worked!
@mightyboshy
@mightyboshy Год назад
Do you know how to automatically close the log in window after a successful log in?
@tookootek
@tookootek Год назад
Try to add something like this in the Log in button. Stage stage = (stage) logInButton.getScene().getWindow(); stage.close();
@mightyboshy
@mightyboshy Год назад
​@@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
@mightyboshy
@mightyboshy Год назад
Nevermind I fixed it, thanks by the way!
@genrescope
@genrescope 3 года назад
PLEASE MAKE A TUTORIAL ON HOW TO DISPLAY CONTENT FROM DATABASE IN TABLE VIEW(JAVAFX) 😭😭😭
@tookootek
@tookootek 3 года назад
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.
@khlifazeidane3750
@khlifazeidane3750 Год назад
@@tookootek please do a video about how to print a bill information on javafx with scene builder please i didn't find any tutorial on youtube about it
@flickdorion794
@flickdorion794 2 года назад
Dude you copied the other guy on youtube with exact same video
@tookootek
@tookootek 2 года назад
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!
@angilstech
@angilstech 2 года назад
Check on this, you can share ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-QsTOAXAtdrM.html
@computer_science10
@computer_science10 8 месяцев назад
Who cares. Sharing is caring
@aa_maruf
@aa_maruf Год назад
21:20
@kinomyyard
@kinomyyard 2 года назад
This is very fast , I can't understand what you are doing 👎
@angilstech
@angilstech 2 года назад
Check on this, you can share if you love it ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-QsTOAXAtdrM.html
@gauravavhad9549
@gauravavhad9549 2 года назад
aai baapane nashta nahi dila ka re
@wakura02
@wakura02 2 года назад
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
Далее
Мама приболела😂@kak__oska
00:16
Просмотров 572 тыс.
JavaFX Login and Signup Form with Database Connection
1:18:49
JavaFX switch scenes 💞
8:35
Просмотров 165 тыс.
JavaFX install & setup (IntelliJ) 💡
5:09
Просмотров 232 тыс.
Scammed selling my MacBook, almost
15:09
Просмотров 43 тыс.
JavaFX install Scene Builder 🛠️
10:14
Просмотров 98 тыс.
JavaFX Tutorial for Beginners - CRUD Application Part 1
30:18