posted 14 years ago
I have a Java application using multiple layers of panels. From one of the panels, I need to display a JDialog box. The constructor of the JDialog needs the parent Frame as an argument. One way I have retrieved this is by calling getParent() multiple times from within the panel, until I get an instance of the Frame. I HAVE to believe there is a more efficient way to do this?