Please am trying to understand how to insert a standalone JPanel (viewPanel) that doesn't extend a JFrame into another JPanel (mainPanel) that is in a JFrame. Would have posted the code, but they codes are very very much. I was thinking i could use a ContainerListener on the mainPanel, but i don't know if that is right! please help.