I have an open source java swing application like this:
http://i47.tinypic.com/dff4f7.jpg
You can see in the screenshot, there is a JPanel divided into two areas, the left and right areas. The left pane has many text links. When I click on the SLA Criteria link, a SLA Criteria popup will appear. A popup is a JFrame object.
Now I am trying to place the popup in the desired area of ββthe JPanel, so this means that the popup will no longer be there, i.e. when I click the SLA Criteria link, its contents will be displayed on the right side of the JPanel. Existing JPanel right pane content will no longer be used. The concept is the same as on the java api documentation page: http://docs.oracle.com/javase/6/docs/api . You click the link in the left frame, you get the content displayed in the right frame.
An example illustration is as follows:
(note: made and edited using the image editor, this is not a real screenshot of the working application)
http://i48.tinypic.com/5vrxaa.jpg
So, I would like to know if there is a way to put a JFrame in a JPanel?
I am thinking about using a JInternalFrame, is this possible? Or is there another way?
UPDATE:
Source:
http://pastebin.com/tiqRbWP8 (VTreePanel.java, this is a panel with left and right areas)
http://pastebin.com/330z3yuT (CPanel.java, this is a superclass of VTreePanel, as well as a subclass of JPanel)
http://pastebin.com/MkNsbtjh (AWindow.java, this is a popup)
http://pastebin.com/2rsppQeE (CFrame.java, this is an AWindow superclass, as well as a JFrame subclass)
source share