Add application to JSplitPane
I want to create a menuapplication with a JSplitPane containing:
1) JTree on the left
2) JScrollPane with a JPanel (cardlayout) on the right
The intention is to open other javaapplications on the rightpanel depending the option choosen in the JTree...
When I click an option in JTree i'm able to show a JLable on the right.
But I am not able to show an javaapp (extends JFrame) on the right.
The javaapp is lauched but the menuapp receives following error:
java.lang.IllegalArgumentException: adding a window to a container
at java.awt.Container.addImpl(Container.java:652)
at java.awt.Container.add(Container.java:343)
at application.AppFrame.valueChanged(AppFrame.java:321)
at javax.swing.JTree.fireValueChanged(JTree.java:2424)
any suggestions?

