Questions tagged [fxmlloader]
310 questions
0
votes
1 answer
Passing Parameters between screens in JavaFX/FXML/SceneBuilder
I'm attempting to build a simple proof of concept program using SceneBuilder and FXML, consisting of two screens. The first screen is just a text field and a button that takes you to the second screen, and the second screen has just a label that,…

Fgsfds
- 11
- 1
- 2
- 6
0
votes
1 answer
Changing one WebView from another WebView in JavaFX
I currently have two WebViews(say leftWebView and rightWebView) inside a horizontal SplitPane which is embedded inside the Anchor Pane. Each WebView has a JavaScript (creating a rectangle with different colors). Now what I want to do is that on…

Talat
- 35
- 1
- 1
- 6
0
votes
1 answer
Buttons Stop working when I add TableView Functionality in the initialize() method
My buttons were working well before I added the table (TableView) functionality to my code, but now an error occurs once I click on the same buttons. The error disappears and the buttons works if I comment out this lines of code in…

MusH
- 85
- 2
- 9
0
votes
1 answer
How to get Stackpane from Main class in Controller class?
To familiarize myself with the scene builder I added a linechart and two numberaxis as nodes in a stackpane with the scene builder.
The parent node will be loaded in the mainApp.java:
public class CsvCommander extends Application {
…

Ramses
- 652
- 2
- 8
- 30
0
votes
1 answer
How to load several FXML in one class?
I create several component with SceneBuilder, my goal is now to use all this files for creating a complete window. But I can't load several FXML, here's what I try to do :
private MenuBar menuBar;
private Pane filtersView;
FXMLLoader…

Evans Belloeil
- 2,413
- 7
- 43
- 76
0
votes
0 answers
JavaFX: Change scene from MenuItem
This is a menubar with two items. Under "Chapter" I would like to be able to select a chapter from the MenuItems and have it load a new .fxml file.
I have produced a cut-down version that gives a System.out.println result when a MenuItem is…
user4782711
0
votes
0 answers
NullPointerException - FXMLLoader.constructLoadException
I seem not to find a fitting solution to my problem.
I always get a NPE while loading the EntryView.fxml file.
I`ve already tried several path formats (e.g. relative, absolute).
Am I having a missconcept of how it works or is it a simple…

elhe
- 122
- 10
0
votes
0 answers
NullPointerException when loading FXML file
So, Ive done it many times without problem and yet this time when I moved fxml and its controller from one project to another I cannot load it. Directory to fxml is fine, directory to controller in fxml file is also good, and I dont see why theres…

Tomasz Mularczyk
- 34,501
- 19
- 112
- 166
0
votes
0 answers
Can't get anything to show up in my JavaFX using an FXML document
So I've been following a tutorial for JavaFX and I used SceneBuilder to make a FXML view for my application. However, I can't seem to get anything to show up when I run the application - what am I doing wrong? I get no exceptions, adn the code…

kibowki
- 4,206
- 16
- 48
- 74
0
votes
0 answers
Style cannot be set after the stage is visible
This is the function. The error is in stage.initStyle(StageStyle.UNDECORATED); which says style cannot be set after the stage is visible. Can you help me out here where i should declare this in the function and suggest some code editing needed if…

Vishal varun
- 11
- 4
0
votes
2 answers
JavaFx8 (+Maven): error when loading the fxml file
I am trying to write a JavaFx8 application using Maven. I wrote a simple application main class and a fxml file (a root fxml file that does nothing).
When I try to load the fxml root file I have the error "Location is not set":
Exception in…

eqtèöck
- 971
- 1
- 13
- 27
0
votes
1 answer
JavaFX change Pane color from a different class
I have a question.
I want to change the color of a pane from another controller class.
I am using this code:
FXMLLoader loader = new FXMLLoader(getClass().getResource("/fxml/Menu.fxml"));
try {
Parent loaded = (Parent) loader.load();
…

Gilian Joosen
- 486
- 3
- 21
0
votes
1 answer
Call FXML files from controller file
I just facing a problem to realize a full MVC model with JavaFX.
I created an easy structure in an fxml file with a split pane.
The idea is to have on the left side a tree menu and on the left side GUI elements to configure my GUI settings.
To fill…

Schneeelf
- 11
- 2
0
votes
1 answer
Unknown javadoc format for FXMLLoader
I am trying to implement a basic Javafx application, FXMLLoader.load can't seem to load in my Test.fxml file, which I made using Scene Builder 2.0
public class Main extends Application {
public void start(Stage primaryStage) {
try {
…

Huszar Gellert
- 23
- 4
0
votes
1 answer
How to set text of a TextArea in JavaFX from constructor?
I want to set a text in a TextArea from start in JavaFX, i use this code in constructor:
public class Myclass implements Initializable{
@FXML TextArea txta;
@FXML Button btn;
String msg;
Myclass(){
msg="Hello World";
…

Arash
- 72
- 1
- 2
- 7