Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Question JavaFX/GUI Help

Joined
Jun 7, 2015
Messages
100
Hi, so I've followed this tutorial, but it throws a file not found exception though I am positive it is right?

Code:
(07:42:29) java.io.FileNotFoundException: \bots\stressSplasher\GUI.fxml (The system cannot find the path specified)

and my file path (excuse the poorly structured folders):
HqrRDJJ.png


The GUI still pops up, but it is way too big and nothing is on it.

As well, my other question; I have a ComboBox populated with 3 spells, how would I set what spell to cast to a variable in the main class?
-> Select spell > send to main class to set the variable > start script > cast spell > repeat cast > etc
 
Joined
Oct 1, 2015
Messages
39
What does the //Load the fxml file code look like in your program?
/com/scourge/bots/stressSplasher/GUI.fxml maybe?
 
Joined
Jun 7, 2015
Messages
100
What does the //Load the fxml file code look like in your program?
/com/scourge/bots/stressSplasher/GUI.fxml maybe?

I have tried that path as well. It's currently:
Code:
 final Parent root = loader.load(StressSplasher.class.getResourceAsStream("/bots/stressSplasher/GUI.fxml"));
 
Joined
Oct 1, 2015
Messages
39
Code:
final Parent root = loader.load(getClass().getResource("/bots/stressSplasher/GUI.fxml");
or "/com/scourge/bots/stressSplasher/GUI.fxml"
I've not used xml only css for javaFX so maybe try this? Sorry I couldn't help if this doesn't work.
 
Joined
Jun 7, 2015
Messages
100
Code:
final Parent root = loader.load(getClass().getResource("/bots/stressSplasher/GUI.fxml");
or "/com/scourge/bots/stressSplasher/GUI.fxml"
I've not used xml only css for javaFX so maybe try this? Sorry I couldn't help if this doesn't work.
Tried that as well. :c Thanks though.
 
Last edited:
Top