What is the best way to design gui in program where user clicking on button start different jframes responsible for gathering info for object creation? To be consistent with OOP principles?
For example user see a MainFrame at start up with list of objects and information about objects. In a case when user need add new object he must click create new object button. Clicking the button starts another jframe with fields required to create object(Building). But this object is comlex and hold another objects in it - Box(to add Box you click addBoxButton and new frame arising with fields for creating Box).
Box containing another object - Commutator. Again to create Commutator user press another button give rise for new frame creating commutator with user data typed in frame.
Then i need to put Commutator in Box and Box than in Building.
Now - I experience some difficulties with information exchange betwee frame classes. For example how should I transfer information gathered from one jframe to another if one of these frames created during runtime?
My question is - Is my GUI an example of bad designed GUI? Maybe its better to put all the gui in one class extending JFrame?