This question is not about a specific program. This is about design - the UML phase of the project.
I am supervising a Java project. It will contain a lot of modal popup dialogs. From a C/C++ standpoint, I have a reference to the main window maintained throughout the program so every dialog may, as necessary, block interactivity with the main dialog. In Java, is there a standard way to do this?
This is a scenario: The main executable owns a JFrame that is the main window. The main executable has an object, I will call it a House. The House has some Room objects. The Room object has a Closet object.
If I want the Closet object to pop up a dialog, blocking input to the main window, do I have to send an instance of the main JFrame to the House, pass it along to each Room, then passing it along to each Closet? Is there a way to say "Give me the top level component"? Or... Is this simply not the way that it is done properly in Java?