protected Component addSingletonComponent (Component oldC, Component newC)

Removes an existing component. When a new component, such as the left corner, or vertical scrollbar, is added, the old one, if it exists, must be removed.

This method returns newC. If oldC is not equal to newC and is non-null, it will be removed from its parent.

Parameters:
oldC    the Component to replace
newC    the Component to add

Returns:  the newC