Questions tagged [fxmlloader]

310 questions
22
votes
3 answers

Is @FXML needed for every declaration?

Is @FXML needed for every declaration or just for the first? In other words, should I use @FXML public Label timerLabel = new Label(); @FXML public TextField mainTextField, projectTextField ; @FXML public Button goButton, deleteAllButton…
Romeo
  • 311
  • 1
  • 2
  • 9
20
votes
2 answers

JavaFX 8 - Tabpanes and tabs with separate FXML and controllers for each tab

I hope to get some answers regarding having fx:include statements for each tab in a tabpane. I have managed with ease to get content to show up BUT referencing methods of the associated controller class simply gives me a nullpointerreference…
Måns Thörnvik
  • 1,038
  • 2
  • 10
  • 22
7
votes
1 answer

JAVA FXCollections LoadException Class is not a valid type

I'm trying to implement a TableView with some data with the help of this Tutorial. Im stuck on populating data from my "Person.java" to the TableView. I tracked the problem down to the part
Matthis Kohli
  • 1,877
  • 1
  • 21
  • 23
4
votes
1 answer

FXMLLoader.load() works fine in pre-java 9 style, but fails in modules

I successfully made a simple JavaFX FXML program (in pre-Java 9 style, not module) I used 3 files and the main class as below: └───javafxfxmldemo FXMLDocument.fxml FXMLDocumentController.java JavaFXFXMLDemo.java Main…
KBee
  • 87
  • 1
  • 5
4
votes
1 answer

java.lang.NullPointerException it works, but error. Trying to find the error

I have an error when I click "start button", it loads me a new fxml where I will play with it, it works fine, but console says me this error.. I cannot understand how to solve it. My FXML: (Look only to startGame, that gives me some problems) …
Alberto32
  • 229
  • 1
  • 4
  • 14
4
votes
1 answer

JavaFX + FXML + webstart: why isn't this working?

Let's create the simplest Hello World app using JavaFX 8 with FXML: Files src/application/Main.java: package application; import javafx.application.Application; import javafx.fxml.FXMLLoader; import javafx.stage.Stage; import…
sebnukem
  • 8,143
  • 6
  • 38
  • 48
4
votes
2 answers

Why I'm getting javafx.fxml.LoadException even the path of the fxml file is correct

I get javafx.fxml.LoadException: When I'm loading and fxml file using following line of code. AnchorPane anchorPane = (AnchorPane)loader.load() This is my fxml file excluding import statements.
4
votes
1 answer

Rotating image animation in fxml

I am having a custom image, i just need to rotate the image while loading the respective page instead of default indeterminate progress indicator symbol. Do we have any css code to rotate the image continuously. please guide me.
Karthikram
  • 105
  • 3
  • 9
3
votes
1 answer

Custom controller factory when using fx:include

I'm using JavaFX version 15.0.1. I want to make more complex scene via injecting several FXML files into it, like this:
3
votes
1 answer

How to properly add @DefaultProperty annotation to custom class that uses @NamedArg

I've created a custom class ImageButton to get rid of some boilerplate code open class ImageButton(@NamedArg("image") image: Image, @NamedArg("tooltipText") tooltipText: String, @NamedArg("width") width:…
pjaro
  • 65
  • 4
3
votes
4 answers

Unable to load ResourceBundle with ResourceBundle.getBundle() Can't find bundle for base name , locale en_US

I see the following exception when I try to load a properties file: Caused by: java.util.MissingResourceException: Can't find bundle for base name /fontawesome/fontawesome, locale en_US I'm using a maven project and my properties file is located at…
user68883
  • 828
  • 1
  • 10
  • 26
3
votes
2 answers

java.io.IOException: rsrc:application/application.bss wrong binary CSS version: 5. Expected version less than or equal to3

I have a created a sample application using javafx. Due to certain restrictions in my network, I cannot install fxpackaging tools such at e(fx)clipse etc. I have created jar using eclipse(version 4.5.1) application works perfectly when I execute jar…
Raju
  • 2,902
  • 8
  • 34
  • 57
3
votes
1 answer

What is wrong with this JavaFX/FXML custom component?

I am learning to write FXML custom components for use with JavaFX 8 and Scene Builder. I wrote the FXML file shown below but Scene Builder will not open it, giving me the message "Open operation has failed" due to the…
user118967
  • 4,895
  • 5
  • 33
  • 54
3
votes
2 answers

JavaFX: How to change scene (FXML) from MenuItem

At 76, I am trying to learn Java and have produced a number of accounting related tutorials that successfully change scenes. Now looking at a structure using menubar and menu items to cope with linking 14 chapters as one of the items on the…
user4782711
3
votes
2 answers

griffon javafx-groovy and fxml?

I tried the samples given in github griffon-master, also I tried the samples of the guide. I would like to use javafx and groovy. I would like to use fxml - thought of a scenario as that: fxml to set the stage, and for changes, use the groovy (set…
Will
  • 43
  • 3
1
2 3
20 21