void (@Nullable JComponent component) { if (mySecondComponent != component) { if (mySecondComponent != null) { remove(mySecondComponent); } mySecondComponent = component; if (mySecondComponent != null) { super.add(mySecondComponent); } revalidate(); repaint(); } }