public class App extends Application { @Override public void start( Stage stage ) throws Exception { /* load form FXMLMain */ FXMLLoader fLoader = new FXMLLoader( getClass().getResource( "FXMLMain.fxml" ) ); Parent root = fLoader.load(); /* ..get its controller..and call some method */ FXMLMain controller = fLoader.getController(); controller.prepare( this ); ... }
Microsoft AX 2012, X++, C#, SQL server, SSRS, Java, JavaFX, Oracle, PL/SQL, Delphi - codes examples, step-by-step tutorials, experiences.
Sunday, December 10, 2017
JAVAFX - How get Controller after form load
When you want to call some method on loaded form, you need at first controller:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment