public void setToolBar ( JToolBar newToolBar ) { JToolBar oldToolBar = getToolBar ( ) ; if ( oldToolBar == newToolBar ) { return ; } if ( oldToolBar != null ) { headerPanel . remove ( oldToolBar ) ; } if ( newToolBar != null ) { newToolBar . setBorder ( BorderFactory . createEmptyBorder ( 0 , 0 , 0 , 0 ) ) ; headerPanel . add ( newToolBar , BorderLayout . EAST ) ; } updateHeader ( ) ; firePropertyChange ( "toolBar" , oldToolBar , newToolBar ) ; }
Sets a new tool bar in the header .