Questions tagged [fxmlloader]

310 questions
0
votes
0 answers

Java FXML java.lang.IllegalStateException: Location is not set

I'm trying to create application using FXML file for my window, but I can't get this to work, none of answers on StackOverflow worked for me and I'M stuck. Class where I want to load file public FXMLWindow() { final FXMLLoader fxmlLoader =…
0
votes
0 answers

Exception in Application start method - Suspecting due to recent Java update

This code worked prior to the Java update, thus I'm assuming the problem lies there. I'm referring to the java update what was release on Jan 18th (Java 8 Update 321). I've tried giving the full path of the .fxml file in .getResource(".."), but that…
0
votes
1 answer

JavaFX FXMLLoader Call to loaded Controller is NULL

I'm trying to call from one controller to another in JavaFX. I have done this in another part of my code in pretty much exactly the same way and it worked, but for some reason it isn't working here. public void showPrimaryAbilityInfo() throws…
0
votes
2 answers

Interact between several FXMLs

I'm trying to write my first application with javaFX and FXML files, but I got stuck with accesing variables of the FXMLs. I am able to start the program with the first scene (first FXML). There is a button I'm able to interact with, and the first…
Endcoder
  • 13
  • 1
0
votes
1 answer

How do you bring the package to FXMLoader in the same package?

When you have the folder structure as below, ├ Main.java └ Bird ├ bird.fxml └ birdController I tried three things to get "bird.fxml" from "Main", but all of them didn't work. //Case 1 Parent root =…
angryduck
  • 21
  • 5
0
votes
0 answers

Pane not showing rectangle grid on scene

package com.gui; import javafx.event.ActionEvent; import javafx.fxml.FXML; import javafx.fxml.Initializable; import javafx.scene.control.Button; import javafx.scene.control.TextField; import javafx.scene.layout.Pane; import…
0
votes
0 answers

Is there some form of priority or functionality issue when loading new FXML files into a Scene? (adopting framework provided by jewelsea)

I've realised only through clearing up code that I thought I could clear up and had cleared from some of my Controller classes where my issue is. To word my question better and provide more clarity to the concept of prioritisation I'll give a brief…
0
votes
1 answer

FXMLLoader.getController() returns null

This section of code executes when the user presses a button, and it should change the scene. The controller of the new scene needs an instance of an object, so I thought of creating a setter method in the new controller class that accepts such…
Fabio Cirelli
  • 65
  • 1
  • 6
0
votes
0 answers

Cannot call add items to ComboBox when called it from another class, the getter of ComboBox returns null

Expanded from here: Cannot invoke "javafx.scene.control.ComboBox.getItems()" because the return value of "Controller.getMyBox()" is null My unachieved goal: After the user picks a date from DatePicker, the date will then be forwarded into ComboBox…
0
votes
0 answers

new FXML scene not loading on button click

I have a gui and I expect that given correct login credentials, a new window should open (The employeeFXML window) when the login button is pressed, however, that is not happening. I have taken a look at How do I determine the correct path for FXML…
0
votes
1 answer

JavaFX correct way to open and close a Stage multiple times

Problem: I am working on a client server desktop application using JavaFx, everything works fine except that I have found that when I open a new stage clicking a button on the Home Page, the new Stage loads data only the first time I open it. The…
Diego
  • 21
  • 1
  • 5
0
votes
1 answer

How do you use primary stage inside the handle method to view the next fmxl in Javafx?

I'm trying to create a primary stage inside the handle method to view the next fmxl (which is Personnel.fxml) after login with username and password in the first fxml (Login.fxml), but still having errors whenever I login. Main.java package…
MaJunior
  • 71
  • 6
0
votes
1 answer

Is there a way to change source path of through a button

I'm trying to change the fxml code of a VBox through a button, but it the code gives me a NullPointerException error: this is my sample.fxml
0
votes
1 answer

My FXML page is not loading, I cannot figure out why

I am having problems figuring out why a page I am trying to load with my JFX FXML loader the page does not load.. With regards to my my FXML load class, my java code complies, but when I execute the code the "More Details page does not load and…
0
votes
0 answers

JavaFX: Null pointer Exception while trying in main fxml to access elements from another loaded fxml in to main fxml

A main fxml is present.When clicked on center button center fxml file is loaded. On clicking the button,the data in text field is accessed and set text label.the setText label is not working.It cannot be accessed.Null pointer exception is…