Structuring GUI elements and eventlisteners
I have a class that contains a lot of GUI objects, and a lot of eventlisteners.
To structure my application better, I would like to split this class into several
classes, where each class represents one type of GUI elements (e.g. a certain type of buttons). I would of course also need one main class that puts it all together.
In the eventlisteners of the GUI elements I sometime refer to other GUI elements (e.g. hide a certain panel when a button is clicked), which is trivial when all the elements are contained in the same class.
However, if I split my class into several classes, how should I structure these classes and/or my eventlisteners so that I am still capable of making changes to the other GUI elements?