so far I have seen one similar question: passing reference of class to another class, who just asked to pass a reference from class A to class B.
Well I did it so far only over the constructor.
This works as long as I do it only that simple way.
...
this.classA = new ClassA(classB); //getting the null reference
this.classB = new ClassB(classA); //getting the reference from new ClassA
...
classB will contain null because it is created after classA, says the null reference exists already.
Is there another way to access the reference after creation in class A?
Says the reference of new ClassB?
A code example would be amazing, since right now I don't understand the "solutions" which I have heard so far by creating multiple constructors... i am not even sure if they work.
edit: That is what my structure looks like
DestinationContentPanel--> DestinationMainPanel-->DestinationHealthMainPanel-->MainPanel<--BottomBarMainPanel<--LeftPanel