Questions tagged [fxmlloader]
310 questions
2
votes
1 answer
How to tell IntelliJ get FXML controller from FXMLLoader for syntax hilighting?
My JavaFX project follows these steps:
Compute optimal values in Model class
initialize Controller
create a new instance of FXMLLoader
set Controller and view.fxml
render View
My fxml file doesn't have a line like…

Stepan
- 1,391
- 18
- 40
2
votes
2 answers
Specify ResourceBundle within FXML file in JavaFX
One can set ResourceBundle in a Java class using code below.
FXMLLoader loader = new FXMLLoader(getClass().getResource("my_view.fxml"));
loader.setResources(MyRes.getBundle());
//Node myNode = (Node) loader.load();
Is it possible to specify…

Stepan
- 1,391
- 18
- 40
2
votes
1 answer
Loading fxml too slow in javafx8
Hi i am just beginner to javafx. Created one project. And faces problem for slowness for loading javafx.
So,found its solution from one of stack overflow question (Scene loads too slow - Scene loads too slow follows:-
i. Use custom loader as given…

Suraj Dangat
- 79
- 8
2
votes
1 answer
How to apply minimal changes to the GUI in javaFX
Is there a preferred way to apply (small) changes to a GUI in javaFX? I prefer using FXML instead of doing it programmatically.
For example: The application starts up with a background and some buttons in a VBox (they are arranged like its defined…

Yakuhzi
- 969
- 6
- 20
2
votes
1 answer
JavaFX Trouble Loading FXML
I'm having trouble inputting my FXML file login into my JavaFX Application.
Can someone tell me what I am doing wrong?
Im very new to JavaFX from Swing so pardon if its really bad or incorrect.
package application;
import…

B Whitehead
- 49
- 2
- 8
2
votes
0 answers
FXMLLoader load time in JDK 8u92
In my JavaFX application I have to load many fxml files (200+) in the same time. I have decided to load them in background Task just like in https://stackoverflow.com/a/34878843 answear. Everything works fine (load time was acceptable) until JDK…

MBec
- 2,172
- 1
- 12
- 15
2
votes
2 answers
JavaFX FXMLoader IllegalStateException: Location is not set
I try to load an FXML file MainView.fxml like it did it in some other projects. But I get "IllegalStateException: Location is not set." But I am pretty sure that I pass in the right location. Do you have any other ideas what could be wrong? I have…

kyromoto
- 71
- 1
- 1
- 8
2
votes
1 answer
FXML JavaFX app run through JNLP java.lang.NullPointerException: Location is required
Crossposted:
• https://community.oracle.com/message/13857396#13857396
• http://www.coderanch.com/t/666195/JavaFX/java/FXML-JavaFX-app-run-JNLP#3105294
I try to deploy JavaFX FXML app as Web Start but I have got exception bellow. Jar is normaly…

Yarl
- 728
- 1
- 7
- 26
2
votes
4 answers
How to subclass custom JFX components with FXML correctly?
I would like to subclass custom JFX components to change/extend their behavior. As a real world example, I would like to extend a data viewer component with editing functionality.
Consider the following very minimal scenario.
Using the class Super…

JD3
- 33
- 1
- 7
2
votes
2 answers
Java FX 1 Controller for multiple FXML - Use Singleton
I am currently working on a Java FX project and I use one Controller for multiple FXML (Please don't ask why)!
The problem I am facing is, that with every new FXML call, the controller creates a new object.
I want to work with the same controller…

DWOME
- 79
- 8
2
votes
1 answer
Instance of OwnClass cannot be created by FXML loader
I am quite new with java and especially with fxml. Please excuse if my question is not challenging.
My problem: The IDE shows me the warning "Instance of Modell.Haushaltsverbrauch cannot be created by FXML loader". I do not now why as I orientated…

Mr.Milhouse
- 21
- 4
2
votes
1 answer
FXML: ClassNotFoundException
I'm very new to JavaFX and I'm having problem using my custom class in FXML. The console keeps giving me this exception when trying to load main.fxml:
... 1 more
Caused by: java.lang.ClassNotFoundException: sample.View$BoardPane
at…

Tengyu Liu
- 1,223
- 2
- 15
- 36
2
votes
0 answers
Java 8 FXML how do you extend a class that cannot have the default constructor
In java 8 it states Builders are deprecated:
http://mail.openjdk.java.net/pipermail/openjfx-dev/2013-March/006725.html
I am trying to extend a chart to add Horizontal and Vertical Markers to the chart. In this case I am extending LineChart. I wish…

bghost4
- 21
- 5
2
votes
1 answer
Can FXMLLoader factory methods be used for user-defined classes?
In Chapter 3 of "Pro JavaFX 8: A Definitive Guide to Building Desktop, Mobile, and Embedded Java Clients", an example illustrates how to specify objects directly in an FXML file.
You can find the complete FXML file, along with the other files in the…

user118967
- 4,895
- 5
- 33
- 54
2
votes
1 answer
Null Point Exception when loading fxml file from controller of another fxml file
I'm facing the same problem!
I was adding an ImageView to a Button and add image path to that ImageView in FXML file using SceneBuilder. This was working fine when I run it through Eclipse IDE but not when run as jar file.
After removing the…

Nandeesh
- 2,683
- 2
- 30
- 42