public void setContent ( Component newContent ) { Component oldContent = getContent ( ) ; if ( hasContent ( ) ) { remove ( oldContent ) ; } add ( newContent , BorderLayout . CENTER ) ; firePropertyChange ( "content" , oldContent , newContent ) ; }
Sets a new panel content ; replaces any existing content if existing .