JDesktop Pane and Internal Frames
Ok here goes. What I would like to do is have a class that acts as a "Base". It will consist of a JDesktop Pane, on which i can load different classes for different purposes.
My current app consists of a JDesktopPane, with a JInternalFrame on which i have 3 tabs with the necessary actions. I was asked to add a new thing to the app, and I feel that I would like to segment it a little bit.
So back to what I'm trying to do. MainUI with a JDesktopPane. How can i call the already existing class (TaxiLogUI). The TaxiLogUI has all the code to create a JInternalFrame. In theory I thought I could, in MainUI, create a new TaxiLogUI object and add it to the JDesktopPane.
publicclass MainUIextends javax.swing.JFrame{
/** Creates new form MainUI */
public MainUI(){
initComponents();
TaxiLogUI test=new TaxiLogUI();
Desktop.add(test);
}
(Desktop initialized in initComponents())
All compiles fine, but i get an error when i try to run it:
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: adding a window to a container
Why is this? What can I do to accomplish what I'm trying to do?
Summary:
*Have a working app (TaxiLobUI) that includes a JDesktopPane, JInternalFrame etc... took out the JDesktop Pane so it just creates a JInternalFrame.
*Would like an app to act as a "Base" for different tasks (MainUI), would like to create a JInteralFrame with the contents from TaxiLogUI
*Getting exception about adding a window to a container
Any help, or even a hint to which direction to look would be much appreciated. Thanks!

