src/TestUnit/Example/Tree/JOutlookBar.java
@SuppressWarnings({ "rawtypes" })
	public void render() {
		// Compute how many bars we are going to have where
		int totalBars = this.bars.size();
		int topBars = this.visibleBar + 1;
		int bottomBars = totalBars - topBars;

		// Get an iterator to walk through out bars with
		Iterator itr = this.bars.keySet().iterator();

		// Render the top bars: remove all components, reset the GridLayout to
		// hold to correct number of bars, add the bars, and "validate" it to
		// cause it to re-layout its components
		this.topPanel.removeAll();
		GridLayout topLayout = (GridLayout) this.topPanel.getLayout();
		topLayout.setRows(topBars);
		BarInfo barInfo = null;
		for (int i = 0; i < topBars; i++) {
			String barName = (String) itr.next();
			barInfo = (BarInfo) this.bars.get(barName);
			this.topPanel.add(barInfo.getButton());
		}
		this.topPanel.validate();

		// Render the center component: remove the current component (if there
		// is one) and then put the visible component in the center of this
		// panel
		if (this.visibleComponent != null) {
			this.remove(this.visibleComponent);
		}
		this.visibleComponent = barInfo.getComponent();
		this.add(visibleComponent, BorderLayout.CENTER);

		// Render the bottom bars: remove all components, reset the GridLayout
		// to
		// hold to correct number of bars, add the bars, and "validate" it to
		// cause it to re-layout its components
		this.bottomPanel.removeAll();
		GridLayout bottomLayout = (GridLayout) this.bottomPanel.getLayout();
		bottomLayout.setRows(bottomBars);
		for (int i = 0; i < bottomBars; i++) {
			String barName = (String) itr.next();
			barInfo = (BarInfo) this.bars.get(barName);
			this.bottomPanel.add(barInfo.getButton());
		}
		this.bottomPanel.validate();

		// Validate all of our components: cause this container to re-layout its
		// subcomponents
		this.validate();
	}
/**
	 * Causes the outlook bar component to rebuild itself; this means that it
	 * rebuilds the top and bottom panels of bars as well as making the
	 * currently selected bar's panel visible
	 */
Causes the outlook bar component to rebuild itself; this means that it
rebuilds the top and bottom panels of bars as well as making the
currently selected bar's panel visible
Causes the outlook bar component to rebuild itself ; this means that it rebuilds the top and bottom panels of bars as well as making the currently selected bar ' s panel visible
@SuppressWarnings({ "rawtypes" })
	public void render() {
		int totalBars = this.bars.size();
		int topBars = this.visibleBar + 1;
		int bottomBars = totalBars - topBars;
		Iterator itr = this.bars.keySet().iterator();
		this.topPanel.removeAll();
		GridLayout topLayout = (GridLayout) this.topPanel.getLayout();
		topLayout.setRows(topBars);
		BarInfo barInfo = null;
		for (int i = 0; i < topBars; i++) {
			String barName = (String) itr.next();
			barInfo = (BarInfo) this.bars.get(barName);
			this.topPanel.add(barInfo.getButton());
		}
		this.topPanel.validate();
		if (this.visibleComponent != null) {
			this.remove(this.visibleComponent);
		}
		this.visibleComponent = barInfo.getComponent();
		this.add(visibleComponent, BorderLayout.CENTER);
		this.bottomPanel.removeAll();
		GridLayout bottomLayout = (GridLayout) this.bottomPanel.getLayout();
		bottomLayout.setRows(bottomBars);
		for (int i = 0; i < bottomBars; i++) {
			String barName = (String) itr.next();
			barInfo = (BarInfo) this.bars.get(barName);
			this.bottomPanel.add(barInfo.getButton());
		}
		this.bottomPanel.validate();
		this.validate();
	}
@ SuppressWarnings ( { "rawtypes" } ) public void render ( ) { int totalBars = this . bars . size ( ) ; int topBars = this . visibleBar + 1 ; int bottomBars = totalBars - topBars ; Iterator itr = this . bars . keySet ( ) . iterator ( ) ; this . topPanel . removeAll ( ) ; GridLayout topLayout = ( GridLayout ) this . topPanel . getLayout ( ) ; topLayout . setRows ( topBars ) ; BarInfo barInfo = null ; for ( int i = 0 ; i < topBars ; i ++ ) { String barName = ( String ) itr . next ( ) ; barInfo = ( BarInfo ) this . bars . get ( barName ) ; this . topPanel . add ( barInfo . getButton ( ) ) ; } this . topPanel . validate ( ) ; if ( this . visibleComponent != null ) { this . remove ( this . visibleComponent ) ; } this . visibleComponent = barInfo . getComponent ( ) ; this . add ( visibleComponent , BorderLayout . CENTER ) ; this . bottomPanel . removeAll ( ) ; GridLayout bottomLayout = ( GridLayout ) this . bottomPanel . getLayout ( ) ; bottomLayout . setRows ( bottomBars ) ; for ( int i = 0 ; i < bottomBars ; i ++ ) { String barName = ( String ) itr . next ( ) ; barInfo = ( BarInfo ) this . bars . get ( barName ) ; this . bottomPanel . add ( barInfo . getButton ( ) ) ; } this . bottomPanel . validate ( ) ; this . validate ( ) ; }
Causes the outlook bar component to rebuild itself; this means that it
 rebuilds the top and bottom panels of bars as well as making the
 currently selected bar's panel visible
Causes the outlook bar component to rebuild itself ; this means that it rebuilds the top and bottom panels of bars as well as making the currently selected bar ' s panel visible
// Compute how many bars we are going to have where // Get an iterator to walk through out bars with // Render the top bars: remove all components, reset the GridLayout to // hold to correct number of bars, add the bars, and "validate" it to // cause it to re-layout its components // Render the center component: remove the current component (if there // is one) and then put the visible component in the center of this // panel // Render the bottom bars: remove all components, reset the GridLayout // to // hold to correct number of bars, add the bars, and "validate" it to // cause it to re-layout its components // Validate all of our components: cause this container to re-layout its // subcomponents