Is it possible for a JFrame to contain another JFrame? This is a question posed by the the following post from 2008.
https://coderanch.com/t/346079/Swing-AWT-SWT-JFace/java/JFrame
I have created a simple stand alone JFrame-based graphical application that needs to be the background for various other frames/dialogs. I tested my stand alone with JInternalFrames, and it worked just the way I wanted. However, when I went to integrate with a larger app (which is it's intended purpose), I discovered that app was JFrame-based as well. Looking through that code, it seems very problematic to try and change it to JInternalFrame. In addition, the main project also launches various JDialog based windows as part of it's normal operation.
The entire purpose of my app when bundled with the main app is to act as a background or container for that app. Specifically, I have two requirements:
1) My JFrame needs to always be on the bottom, behind all other frames/dialogs.
2) My JFrame needs to be the bounding area of all the other frames/dialogs.
Working with JInternalFrames, this comes naturally. But as it stands now, the best I can do is instantiate my app, then the main app as well. And that main app is in no way bounded to or by my JFrame. Does anybody know a way around this? I'm trying to alter the main apps code as littel as possible and do all the work or fancy stuff in my code. I would appreciate any advice that anybody has to send my way. Here is an tiny example of what I'm trying to do, that is failing.
Thanks again, and any alternative approaches are, of course, welcome.