In my JavaFx Application I need to call a method that is located in the Controller class from a class in the same package. I want to know if this possible to do. I have searched and found somewhat useful stuff but I couldn't figure it out.
I have tried creating an interface with the method that needs to be called and implementing the method in the controller, then using it in the class I need. This does not work and gives errors.
public class Controller implements Initializable {
...
public void doSomething() {
}
}
public class Myclass {
//I need to call the doSomething method here...
}
Any help appreciated! Please ask for more details if situation is unclear.