protected void showComponent(JComponent replace) { if (myEditorComponent != null) { myComponent.remove(myEditorComponent.getExternalComponent()); myEditorComponent.dispose(); myEditorComponent = null; } if (myReplace != null) { myComponent.remove(myReplace); myReplace = null; } myReplace = replace; myComponent.add(myReplace, BorderLayout.CENTER); myComponent.validate(); }
public void dispose() { if (myEditorComponent != null) { myEditorComponent.dispose(); } }