Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!
RuneMate will permanently shut down on August 7, 2026
due to events outside our control. You can continue using RuneMate until this date after which it will no longer be available. Thank you to everyone that contributed to RuneMate's success and to the community for the opportunity to serve you all these years.

  • Learn about RuneMate Vault and how its zero knowledge local encryption already protects your sensitive information.
  • Edit or delete your RuneMate account from your Account Settings.
  • All account upgrade subscriptions have been cancelled. No action required.

Tutorial JavaFX for Beginners

Joined
Mar 29, 2016
Messages
54
My controller was not getting used even after calling setController.

Changing this
Code:
// Load fxml file
FXMLLoader fxmlLoader = new FXMLLoader();
fxmlLoader.setController(new GUIController(script, this));
final Parent root = fxmlLoader.load(getClass().getResource("sample.fxml"));

to this
Code:
// Load fxml file
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("sample.fxml"));
fxmlLoader.setController(new GUIController(script, this));
final Parent root = fxmlLoader.load();

solved the problem.
 
Joined
Nov 26, 2014
Messages
616
I would recommend Scene Builder - Gluon instead of the Oracle Scene Builder, as this one is much more up to date. Alternatively, you could download the source of Oracle's Scene Builder and compile everything yourself, but why would you.

Edit: oh, someone already mentioned it.
I'm probably going to remake this for the Spectre UI, thanks for the link, it looks way better than vanilla Scene Builder.
 
Top