0

i want to start a site project of mine, but dont wanna start head first and try to make some sort of plan. I am using Scenebuilder for my GUI and got now a question: Is it needed, that every information (important for the gui) is delivered to the controller class?

For Example: After a event, i wanna change the text of a label. Do i need to call the function (that change the label) in the controller class and get the String per return or can i somehow change the label outside of the controller class?

Sry for my bad english... if i wasnt clear enough, i will edit this post.

Christopher
  • 59
  • 10
  • 2
    I recommend designing a proper model, passing it to the controller (https://stackoverflow.com/questions/14187963/passing-parameters-javafx-fxml). If you use properties, you can easily modify the properties and use binding/listeners, if one of your scenes is "interested" in a certain property. – fabian Jan 04 '18 at 14:24
  • 1
    Check my [answer](https://stackoverflow.com/a/47754031/5165833) here on a similar Stack Overflow question – arxakoulini Jan 04 '18 at 14:38

0 Answers0