If a class like B in the example Code has implemented a Listener(e.g. MouseListener)
and in class A is an Instance from B, how can I call a Method from A with the implementation of the Method in class B.
The example Code makes it clearer what I mean.
I have read about a callback function to do this.
Are there more ways to do this or is that a general design failure from me?
Lord HN cool idea but nope 😆
Let us say that the Listener is a MouseListener and the overriden method is mouseClicked or something similar.
Now the Listener triggers and the method mouseClicked is called.
And this method calls the method from A.
I hope it's now more clear. 😅