Daniel Stallard

Ranch Hand
+ Follow
since Mar 17, 2017
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Daniel Stallard

Hey are you using an IDE  like net beans or eclipse. When I was first starting to learn Java  i waould use the debugger to walk me through code I was having issues with. This really helped me understand what the code was doing step by step. I'm still learning an I still use the debugger to help me grasp code better.
7 years ago
This is my error i get when i run it it prints the riddle in the ide and the answer

Exception in Application start method
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389)
at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$155(LauncherImpl.java:182)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException: Location is required.
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3207)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3175)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3148)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3124)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3104)
at javafx.fxml.FXMLLoader.load(FXMLLoader.java:3097)
at dstallardriddlemeup.DStallardRiddleMeUp.start(DStallardRiddleMeUp.java:22)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
... 1 more
Exception running application dstallardriddlemeup.DStallardRiddleMeUp
I:\MyFiles\Programing\Classes\ITP-220 Java 2\Assignments\Project\dStallardRiddleMeUp\nbproject\build-impl.xml:1052: The following error occurred while executing this line:
I:\MyFiles\Programing\Classes\ITP-220 Java 2\Assignments\Project\dStallardRiddleMeUp\nbproject\build-impl.xml:806: Java returned: 1
BUILD FAILED (total time: 1 second)
7 years ago
I changed my riddle class
so now
if i do a system.out.print(rr) i get the riddle but givenriddle.setText still blows up.
7 years ago
here is my updated code

The Controller:



my riddle class


i used the simp;e string property casue thought it may work but it dont.Least i dont see where it has chaged anything so i may put the Riddle and Answer var back to a string
7 years ago
true i could do that didnt think about it that way but i did get rid of that error but now im having an issue with when i try to get the label to display the riddle it has a null value and not the string.The string is a sting up til i try to put it in the givenriddle variable then it turns to null and blows up
7 years ago
the one should be an i So it should be while i is less than 5. The reason i have that is cause i only wana give them five riddles than ask if they wanna play again

7 years ago
Sorry i thought i did put te error in there im getting an error on line 20 in the fxml file its says something about it not being in the root
7 years ago
Hey, guys, I'm trying to get this program to work I got a text file it will read in and then it will cycle through the array list of riddle and give one at a time the user answers it to see if they get it right. For now, I'm just trying to get it to display the riddle and check to see if the answer is right. I'm using Java scene builder I'm just now playing with it.So I'm lost on a lot of it but from what I have seen and read I don't understand why this doesn't work.

This is the Controller



This is the FXML Document

which is where I get an error line 20



This is the start stage



Any help would be great id like to learn to put graphics with my code.

7 years ago
okay cool deal i have used scratch jr with the youngest. Its on her tablet she likes it alot an what ive seen it was easy to grasp an navigate si i figured scratch was the same.
7 years ago
does it ggive you steps on installing the software?
7 years ago
awsome so it would be grat for my 12 year old that loves video games?
7 years ago
Whzt type of material is covered? is it just basic material or do you cover more as in like small animations or anything like that?
7 years ago
So how approachable would you say this is for beginners?
7 years ago
so in what thread do we get to ask questions
7 years ago