void (@Nullable JComponent content) { if (content == null && myContent != null) { myPanel.remove(myContent); } myContent = content; if (myContent != null) { myContent.setVisible(myOn); myPanel.add(myContent, BorderLayout.CENTER); } }