void () { if (myContentRootPanel != null) { myMainPanel.remove(myContentRootPanel); } myContentRootPanel = createContentRootPane(); myContentRootPanel.initUI(); myContentRootPanel.setSelected(myIsSelected); myMainPanel.add(myContentRootPanel, BorderLayout.CENTER); myMainPanel.revalidate(); }