I know that there are listeners in JavaFX, and i’m sure Java. But I’m confused as how to implement them.
I have a boolean variable that is changed throughout my program. Everytime the boolean is changed, I want a function myFunc() to be ran.
Can this be done easily?
As simple as this:
and whenever you want to change the boolean flag, you should do it via this method.