docs: public synchronized void addItem( final JComponent panel , final String name ) {
  
  		Dimension panelD = panel.getPreferredSize();
  
  		final boolean sizeChanged = bodyWidth != panelD.width || bodyHeight != panelD.height;
  
  		// make the preferred size large enough to hold all the images
  		bodyWidth = (int)Math.max(bodyWidth, panelD.getWidth());
  		bodyHeight = (int)Math.max(bodyHeight,panelD.getHeight());
  
  		panels.add(panel);
  		SwingUtilities.invokeLater(new Runnable() {
  			public void run() {
  				listModel.addElement(name);
  				if (listModel.size() == 1) {
  					listPanel.setSelectedIndex(0);
  				}
  				// update the list's size
  				Dimension d = listPanel.getMinimumSize();
  				listPanel.setPreferredSize(new Dimension(d.width + scroll.getVerticalScrollBar().getWidth(), d.height));
  
  				// make sure it's preferred size is up to date
  				if( sizeChanged ) {
  					Component old = ((BorderLayout) bodyPanel.getLayout()).getLayoutComponent(BorderLayout.CENTER);
  					if (old != null) {
  						old.setPreferredSize(new Dimension(bodyWidth, bodyHeight));
  					}
  				}
  				validate();
  			}
  		});
  	}