1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Question JavaFX/GUI Help

Discussion in 'Developer Support' started by Scourge, Nov 9, 2015.

  1. Scourge

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

    Code (Text):
    1. (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):
    [​IMG]

    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 bot > cast spell > repeat cast > etc
     
  2. pkingd3vil

    Joined:
    Oct 1, 2015
    Messages:
    39
    Likes Received:
    5
    What does the //Load the fxml file code look like in your program?
    /com/scourge/bots/stressSplasher/GUI.fxml maybe?
     
  3. Scourge

    Joined:
    Jun 7, 2015
    Messages:
    100
    Likes Received:
    16
    I have tried that path as well. It's currently:
    Code (Text):
    1.  final Parent root = loader.load(StressSplasher.class.getResourceAsStream("/bots/stressSplasher/GUI.fxml"));  
     
  4. pkingd3vil

    Joined:
    Oct 1, 2015
    Messages:
    39
    Likes Received:
    5
    Code (Text):
    1. 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.
     
  5. Scourge

    Joined:
    Jun 7, 2015
    Messages:
    100
    Likes Received:
    16
    Tried that as well. :c Thanks though.
     
    #5 Scourge, Nov 10, 2015
    Last edited: Nov 10, 2015

Share This Page

Loading...