JavaFX Java GUI Tutorial - 10 - Extract and Validate Input

  Рет қаралды 196,723

thenewboston

thenewboston

Күн бұрын

Пікірлер: 58
@JonnieZuramski
@JonnieZuramski 9 жыл бұрын
sup bucky love you m8 these tutorials are getting me through college lol
@108everest
@108everest 8 жыл бұрын
+Jonnie Z Says a lot about the current education system.
@JonnieZuramski
@JonnieZuramski 8 жыл бұрын
+everest108 I think my education is rather good, it really just me lol... I have a hard time paying attention so it's nice to go back and brush up on some code after watching these
@fireflies15
@fireflies15 5 жыл бұрын
same here
@TimoBaader
@TimoBaader 5 жыл бұрын
@@JonnieZuramski try microdosing mushrooms (not even joking)
@skytwohigh8721
@skytwohigh8721 4 жыл бұрын
@@TimoBaader Hundred Procent, i did it with lsd and my concetration problem and learn problems went miles away. It helps me so much in my current universary time
@hinrikkonnecker7077
@hinrikkonnecker7077 3 жыл бұрын
Without your tutorials I would have killed myself by now
@pyram66
@pyram66 8 жыл бұрын
For some reason I thought "my age is tuna fish" was really funny. Have a like! :)
@francisemv1788
@francisemv1788 5 жыл бұрын
at the end, home boy is like, aight, i'mma head out n get some lean
@patrickpfeiler3449
@patrickpfeiler3449 9 жыл бұрын
Hello. Why do you have 2 parameters for your function isInt(TextField input, String message). Then you use at first input.getText() and then mesage, Isn't it better when you only use message and delete TextField input?
@TheAdas0
@TheAdas0 8 жыл бұрын
+Patrick Pfeiler He mentioned the reason of it in the video. He wanted to show two ways of doing that and in addition you can use them for a bit different purposes. Watch again more carefoully :)
@andrewhughes459
@andrewhughes459 7 жыл бұрын
The TextField input parameter gives him a reference to the actual TextField object on the GUI, so he can alter it (change width, height, position, color, text in the field, etc). The String parameters will allow him to use String manipulation as needed, such as splitting, substrings, comparing in RegEx, etc. Say you wanted the background color of the TextField to turn red/orange if a character is a letter, you would need the TextField object to be passed in to alter the background color.
@apostolis6725
@apostolis6725 3 жыл бұрын
Very useful video for so practical issues! Thanks a lot :)
@yashchaudhari7558
@yashchaudhari7558 7 жыл бұрын
What is the parsing technique for date? I mean if I have to put a date in a javafx text field, how it will get inserted into the database properly?
@SenseiEli
@SenseiEli 4 жыл бұрын
This voice in 2020! They would quarantine you! And send you to Covid 19 test!!! hhhhhhhh Lucky 2015 !!
@cesarpauloalves3844
@cesarpauloalves3844 7 жыл бұрын
Are you the guy from "Casually Explained"?? haha your voice just looks like his.. Your tuts rock ;)
@carlsanc3880
@carlsanc3880 9 жыл бұрын
My question is, i am trying to learn the best practices, lets say needed to create an object and store said object, who process that request? Is it a good practice to collect information in B and process it in C aswel? Or should i collect it on C, make sure it is good(ex: user entered data within permited range etc) and then pass it to the Main class (A) and have said class create and store the object?
@shashwatkhanna6036
@shashwatkhanna6036 9 жыл бұрын
Bucky, Dont Worry! We know you don't Smoke!
@kuntahouen3835
@kuntahouen3835 4 жыл бұрын
It doesn't check if the input number is positive or negative. You can input a negative age and it is valid. Keep that in mind.
@hossamnasser9717
@hossamnasser9717 4 жыл бұрын
Then How Can We Also Validate That ?
@errerogdfgdf
@errerogdfgdf 6 жыл бұрын
Using regex is better idea in my opinion ;p you can't validate more difficult strings by comparing them to int like it is in yours method. By regex you can define whatever you want as a pattern. Let's goole that for more info ...
@jewelleharper6285
@jewelleharper6285 8 жыл бұрын
His voice is darn adorable!
@aietisenaj6425
@aietisenaj6425 4 жыл бұрын
how do you get the output to display on the GUI instead of the console?
@dunginhanh3460
@dunginhanh3460 7 жыл бұрын
As i know, lambda can only use instance variables or instance objects, why in this video it can access to window and nameInput inside start method?
@ionutcozma6814
@ionutcozma6814 5 жыл бұрын
Hello! If I want to introduce text in the TextField how can i check if what I insert there is a name(string) and not a number or something else? Please help me!
@markanthonyoccena7345
@markanthonyoccena7345 3 жыл бұрын
Where can I find the code? the github files seems to be outdated.
@SenseiEli
@SenseiEli 4 жыл бұрын
Thank you again!
@gurkansanli1978
@gurkansanli1978 8 жыл бұрын
Why do you need "return true" or "return false". It works without return.
@Xehanort94Ger
@Xehanort94Ger 8 жыл бұрын
You have to do two things - validate the input and handle the error case. The validation can be performed by the isInt() method, which returns true or false. The error handling should be done somewhere else (since it is not a part of determining if something is actually an Integer) - either directly in the lambda passed to the Button, or in a error handling method. You could also combine the two into a single method like verifyAge() that is called from the Buttons OnClick Event-Handler (this is pretty much what Bucky did, but with better naming).
@MrKelvinJane
@MrKelvinJane 7 жыл бұрын
void/ boolean makes no difference. I am not sure why he would use boolean
@MrKelvinJane
@MrKelvinJane 7 жыл бұрын
I thought I was the only one who was a bit confused
@syedmuhammadoan2039
@syedmuhammadoan2039 6 жыл бұрын
2 years too late to reply now but in this code offcourse it's not needed but it's good to divide your code in small chunks so you can return boolean at the end and depending on the boolean, handle the result outside of the function instead of handling inside isInt(). Depends on your liking :)
@Dante3085
@Dante3085 6 жыл бұрын
Has anyone had performance issues with javafx programs. when i resize them it gets laggy and stuttery.
@addykulkarni
@addykulkarni 5 жыл бұрын
hey ! i was doing the same thing , but I am getting Nullpointer exception when i try to output the text in the text field, i had assigned it an fx: id in scene builder
@Mr17slayers
@Mr17slayers 4 жыл бұрын
burst out laughing when he said tuna fish
@nicolas267s
@nicolas267s 8 жыл бұрын
Try to print "sout" and press Tab. It's magic. =D
@anilmawji
@anilmawji 7 жыл бұрын
yeet majikeee
@NA-is2oo
@NA-is2oo 7 жыл бұрын
oh and also try to print psvm and press Tab. thats magic too
@ilieschamkar6767
@ilieschamkar6767 5 жыл бұрын
thank you!
@vlada_janjanin
@vlada_janjanin 7 жыл бұрын
why do you need to pass the string also, you already have it from the input, think it's more intuitive and cleaner. i mean, it's not important, just saying. this tutorial is great by the way
@vivekrawatvlogs
@vivekrawatvlogs 8 жыл бұрын
how to restrict user to type any character other than number in javafx ?
@rafaelangelopiad2320
@rafaelangelopiad2320 4 жыл бұрын
bucky, u da best
@devdylan6152
@devdylan6152 4 жыл бұрын
thank you for your comic relief XD
@abdessalemkheyar3619
@abdessalemkheyar3619 4 жыл бұрын
hey man your videos are really helpfull can you make one when you're working wih database?
@Utshaw
@Utshaw 8 жыл бұрын
Where can i get all these source code ?
@aNDy-qh1em
@aNDy-qh1em 8 жыл бұрын
Hi, thanks to Bucky you can find it on github github.com/joegaBonito/JavaFX--JAVA-/blob/master/10%20Extract%20and%20Validate%20Input/src/Main.java
@jakubkorsak605
@jakubkorsak605 9 жыл бұрын
Nice Video!
@xrealx369
@xrealx369 8 жыл бұрын
How can we show the ouput (result) in the app itself?
@787vijay
@787vijay 8 жыл бұрын
u can print the output in a label or smth and add it to the current scene
@xrealx369
@xrealx369 8 жыл бұрын
2late but thnx I actually did that on a project I had. function that makes new scene with new parameters for the labels :)
@anilmawji
@anilmawji 7 жыл бұрын
Cool :D
@kiranpaudel7145
@kiranpaudel7145 5 жыл бұрын
hey bucky, could you pls make some stuff which displays or reads news using JavaFX when we request the computer?
@torbjrnbakke5608
@torbjrnbakke5608 4 жыл бұрын
I'm here to learn how to how to get dat data
@NA-is2oo
@NA-is2oo 7 жыл бұрын
lol dont judge me i just had a cough love your intros
@tjitsekoster9379
@tjitsekoster9379 5 жыл бұрын
TIL Bacon is not a number
JavaFX Java GUI Tutorial - 11 - CheckBox
7:38
thenewboston
Рет қаралды 132 М.
JavaFX: TextField Input Validation
7:14
Almas Baim (AlmasB)
Рет қаралды 10 М.
How it feels when u walk through first class
00:52
Adam W
Рет қаралды 24 МЛН
My Daughter's Dumplings Are Filled With Coins #funny #cute #comedy
00:18
Funny daughter's daily life
Рет қаралды 36 МЛН
Миллионер | 2 - серия
16:04
Million Show
Рет қаралды 1,7 МЛН
Elon Musk fires employees in twitter meeting DUB
1:58
GeoMFilms
Рет қаралды 17 МЛН
JavaFX Java GUI Tutorial - 18 - Simple TableView
12:04
thenewboston
Рет қаралды 193 М.
JavaFX Java GUI Tutorial - 16 - TreeView
14:30
thenewboston
Рет қаралды 100 М.
Think Fast, Talk Smart: Communication Techniques
58:20
Stanford Graduate School of Business
Рет қаралды 41 МЛН
JavaFX Java GUI Tutorial - 5 - Creating Alert Boxes
10:54
thenewboston
Рет қаралды 314 М.
JavaFX TextField 💬
6:39
Bro Code
Рет қаралды 60 М.
JavaFX Animated field Validation alert | JavaFX Tutorial
8:31
Cool IT Help
Рет қаралды 4,6 М.
JavaFX Java GUI Tutorial - 20 - Adding and Deleting TableView Rows
10:05
Basic User Input Validation in Java
33:45
Stephen Sheridan
Рет қаралды 20 М.