I have a SodaMachineWindow class with a main method that creates a sodaMachineWindow.
I have a LeftPanel class and a RightPanel class. A leftPanel and rightPanel are added to the sodaMachineWindow.
I have a ComponentPanel class. A componentPanel is added to the leftPanel.
I have a ImagePanel class. An imagePanel is added to the rightPanel.
I am attempting to use a button in the componentPanel to display a painted icon on the imagePanel.
I have instantiated an ImagePanel object in my SodaMachineClass.
I need to pass the ImagePanel object down to the ComponentPanel through the constructors so I have a reference to the real ImagePanel inside my ComponentPanel class.
How do I accomplish this?