I've done something similar in swapping out 2 different JPanels at runtime, based on some selection the user makes in the window. Both of these JPanels are inherited from the same subclass of JPanel and therefore have the same public methods. By doing this, other code in the window can talk to either JPanel without needing to know which class it is. I use a reference variable of the ancestor JPanel for both. Here are the variable declarations: JPanelResult jPanelResult; // descendent of JPanel JPanelResultSubclass1 jPanelResult1; // descendent of JPanelResult JPanelResultSubclass2 jPanelResult2; // ditto ... // when window is initialized: jPanelResult = new jPanelResult1; // start out with this panel jPanelMiddle.add(jPanelResult,...); // add to another content panel When they get swapped out, the code looks similar to this: jPanelMiddle.remove(jPanelResult); jPanelResult = jPanelResult2; // assign the other one to the var jPanelMiddle.add(jPanelResult, ...); // add the new one jPanelResult.revalidate(); // this step and the next one are necessary! jPanelResult.repaint(); Hope this is helpful -- and not too late.