Questions tagged [fxmlloader]

310 questions
2
votes
1 answer

FXMLLoader.load can't be resolved to a type

So I created a FXML interface using JavaFX's Scene Builder tool, and I'm trying to load it via my code. However, I ran into this error when trying to load my FXML document: FXMLLoader.load can't be resolved to a type. Here is my code: import…
kibowki
  • 4,206
  • 16
  • 48
  • 74
2
votes
1 answer

JavaFX 8 is there way to get the FXML reference from a Node?

I am trying to figure out if there is a way to get a reference to the FXML for a given node. For example I am dynamically loading views - assume I have a Pane referenced in the current Controller: private void openView() { FXMLLoader loader =…
purring pigeon
  • 4,141
  • 5
  • 35
  • 68
2
votes
1 answer

JavaFX web deployment: FXMLLoader NullPointerException

I wanted to try JavaFX web browser deployment, so I started a very simple test project using the IntelliJ community edition 14.0.2 JavaFX Application template. Here's the code: (NO plugin, external library or maven) Main.java @Override public void…
suushiemaniac
  • 47
  • 1
  • 6
2
votes
1 answer

NPE in FXMLLoader

I have an application that is a hybrid of Swing (legacy) and JavaFX components. It worked fine until I tried inserting a Preloader into the mix, now all my JavaFX components that utilize fxml files and the FXMLLoader don't work, because an NPE is…
Adam Law
  • 542
  • 1
  • 7
  • 21
2
votes
1 answer

FXMLLoader get controller returns null

I have a recursive case of FXML loading needed here. If I choose to View an Objective, it takes me to another instance of the screen that loads a list of Strategy objects. If I choose to view a Strategy, it takes me to another instance of the screen…
Toni_Entranced
  • 969
  • 2
  • 12
  • 29
1
vote
1 answer

fx:include with "resources" throws MissingResourceException but works in Java Code

I'm trying to use the resource tag inside fx:include in a FXML file. What I don't understand is, that loading the resource bundle manually with ResourceBundle.getBundle() works completely fine. I already tried a lot of variants in the fxml…
wand555
  • 155
  • 6
1
vote
1 answer

change label text of FXML scene from another class via controller class

I am relatively new to JavaFX, FXML and SceneBuilder in general. I am working on a project for uni where I have to build an application which includes the functionality of displaying different lecture profiles. The different profiles are stored in a…
marlonN
  • 13
  • 3
1
vote
0 answers

JavaFX, exception thrown in Application start method

I am trying to create a GUI with JavaFX/JavaFXML. To get started, I am following a tutorial: https://code.makery.ch/library/javafx-tutorial/part1 When I try to execute the code, an exception is thrown in the start function. Exception in Application…
Nomed
  • 11
  • 4
1
vote
1 answer

JavaFX 11 WebView LoadException

I have been endeavouring to implement a JavaFX application using FXML which includes a WebView. However, when run this results in a ClassNotFoundException:javafx.scene.web.WebView leading to a javafx.fxml.LoadException, but I am perplexed by…
Datango
  • 45
  • 4
1
vote
1 answer

What exactly does FXMLLoader do when a document is loaded?

Let's say I want to load an FXML document to be used somewhere in my application. As far as I'm aware, there are two ways of doing this: Call the static FXMLLoader#load() method. Initialize an FXMLLoader (with the resource…
the4naves
  • 333
  • 2
  • 9
1
vote
0 answers

fxml File won't load

i am trying to navigate to an other fxml file but when i try parent root = loader.load() he catches an exception and throws it back. He prints SYSTEEMFOUT bij laden Fietsenbeheer: but no message with it. laadLedenBeheer is the one that works fine…
synicburst
  • 25
  • 4
1
vote
1 answer

why FXMLLoader giving error when used to load a FXML file?

I was following a JavaFX tutorial and wrote the following code. All the required header files are imported. Main.java public class Main extends Application { @Override public void start(Stage primaryStage){ try { Parent root =…
1
vote
1 answer

NullPointerException and LoadException when using variables from one controller when initializing another. JavaFX

I am developing an app on netbeand and SceneBuilder with JavaFX and FXML files. I have different controllers for diferent content that popup in the main window. I call from the main controller for the FXML to popup, that has it's own sepparate…
1
vote
0 answers

Error resolving onAction method in my JavaFX project

I'm working on a javafx project that allows the user to input a URL (for a video) into a textfield and once they hit the download button, will be able to download this video and save it to their computer. My Controller class: package…
user14759644
1
vote
1 answer

How can I get a reference to the controller of an FXML?

I'm trying to make a small "Login then Main Menu" form using JavaFX and Gluon's Scene Builder. I've made 2 scenes so far, the first one is a "Login" screen in which I've connected a SQLite Database, after putting the right Username and Password it…
Zirus12
  • 15
  • 3