Actually the essence: There is a graphical interface written by the "master" (which is SceneBuilder) through the javaFX 2.0 graphic cover (sample.fxml). Again, the master itself contains Controller.java

The task using the methods of objects to change the objects themselves. for example, fill in the contents of "combobox" with new values.

However, since everything created "SceneBuilder", it is not very clear how to refer to already existing objects.

Please suggest how to do it.

  • Register the required fx: id objects via SceneBuilder and create a field of the same type in the controller, where the field name is the same as fx: id. Add a @FXML annotation in front of the field. This way you will access the object inside the controller. - Alexander Savostyanov
  • and this is the correct answer! - user282269
  • @ AlexanderSavostyanov, the answers - in the answers, please. - ߊߚߤߘ

1 answer 1

thanks, registered inside the class "Controller" so

@FXML public ComboBox<String> BoxLogins; 

after that it works, i.e. becomes available.