Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java Build a JavaFX Application Design a Better App The Controller

Umair Khalil
Umair Khalil
5,285 Points

I'm following the instructions of the instructor but after creating a method for #handle say sup im getting this error

Exception in Application start method Exception in thread "main" 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:745) Caused by: javafx.fxml.LoadException: /C:/Users/diaded/IdeaProjects/Sup/out/production/Sup/sample/sample.fxml:26

Nathan Bovino
Nathan Bovino
10,905 Points

Can you please include your code. It will help to answer the question

I had the same issue when I just went through it I looked a bit closer at my code and realized that when IntelliJ created the default Project that it had the wrong ActionEvent imported for me. It automatically imported the

  • import java.awt.event.ActionEvent;

instead of the

  • import javafx.event.ActionEvent;

Check your Controller.java file to make sure that you are importing the javafx ActionEvent and not the awt ActionEvent. I hope that helped!

1 Answer

I had the same problem. the file " <?import javafx.event.ActionEvent?> " was never implemented so i had to do it myself #firstworldproblems..... but after that i could continue through the Error ID (red lightbulb)