JavaFX trouble shooting - NullPointerException in controller class

preview_player
Показать описание
This video shows the cause and solution for dealing with typical null pointer exceptions in the controller class for JavaFX
Рекомендации по теме
Комментарии
Автор

i already have the fx:ids correct and its still giving me a nullpointer exception

TheJameskies
Автор

I've spent hours pouring over forums and the internet in general for a solution to this problem. I set the id in layout but didn't use the fx:id dropdown in code. Now it works and I feel motivated again! Thank you!

justinruark
Автор

You really saved me from breaking things. Thank you so much!

iammayurn
Автор

Well I have the fx:id right and i'm still getting NullPointer when I try to setText() on a TextField. Do you have to do something on the initialize() method?

Kaoducky
Автор

Meu irmao. Depois de 3 anos seu video me ajudou muito. Tava pra ficar doido procurando e nada. Ate encontrar esse video. Muito obrigado. Ajudou demais.

wandersongomes
Автор

save your time error is you are not declaring id or not in fx:id declare it see 4:25

yourdailyfails
Автор

i already did that long before watching this video but im still getting the error

CompetitiveMinecraftLegacy
Автор

Thanks, but I also want solution of Java application thread error problem

mayurpatil
Автор

REMOVE THE DAMN 'STATIC' FROM EVERYWHERE. MY LABELS WORKED WITH TIMER AND UPDATED EVERY TIME, NO PUN INTENDED. HOPE THIS WILL SAVE SOMEBODY FROM BREAKING THINGS . . .

ssalem
Автор

Wholy shit fx is bad. Okay so there are two fields fxid and id, make sure your using the fxid or it doesn't work.

spik
welcome to shbcf.ru