private JPanel makeHolderPanelForToolBarBean(final String tempName,
                                               Object tempBean,
                                               boolean wekawrapper,
                                               String algName,
                                               final boolean metabean) {
    // ---------------------------------------
    JToggleButton tempButton;
    final JPanel tempP = new JPanel();
    JLabel tempL = new JLabel();
    tempL.setFont(new Font(null, Font.PLAIN, 9));

    String labelName = (wekawrapper == true) 
      ? algName 
      : tempName;
    labelName = labelName.substring(labelName.lastIndexOf('.')+1, 
				    labelName.length());
    tempL.setText(" "+labelName+" ");
    tempL.setHorizontalAlignment(JLabel.CENTER);
    tempP.setLayout(new BorderLayout());

    if (tempBean instanceof Visible) {
      BeanVisual bv = ((Visible)tempBean).getVisual();

      tempButton = 
	new JToggleButton(bv.getStaticIcon());
      int width = bv.getStaticIcon().getIconWidth();
      int height = bv.getStaticIcon().getIconHeight();
      
      JPanel labelPanel = 
	multiLineLabelPanel(labelName, width);
      tempP.add(labelPanel, BorderLayout.SOUTH);
    } else {
      tempButton = new JToggleButton();
      tempP.add(tempL, BorderLayout.SOUTH);
    }
    tempP.add(tempButton, BorderLayout.NORTH);
    //    tempP.add(tempL, BorderLayout.SOUTH);
    
    //  holderPanel.add(tempP);
    //    tempToolBar.add(tempP);
    m_toolBarGroup.add(tempButton);
    
    // add an action listener for the button here
    final Object tempBN = tempBean;
    final JToggleButton fButton = tempButton;
    //	  final JToggleButton tempButton2 = tempButton;
    tempButton.addActionListener(new ActionListener() {
	public void actionPerformed(ActionEvent e) {
          boolean changeCursor = true;
	  try {
	    m_toolBarBean = null;
            if (metabean) {
              if ((e.getModifiers() & ActionEvent.SHIFT_MASK) != 0) {
                changeCursor = false;
                m_toolBarGroup.remove(fButton);
                m_userBoxPanel.remove(tempP);
                m_userBoxPanel.revalidate();
                m_userComponents.remove(tempBN);
                if (m_firstUserComponentOpp) {
                  installWindowListenerForSavingUserBeans();
                  m_firstUserComponentOpp = false;
                }
                if (m_userComponents.size() == 0) {
                  m_toolBars.removeTabAt(m_toolBars.getTabCount() - 1);
                  m_userToolBar = null;
                  notifyIsDirty();
                }
              } else {
                SerializedObject so = new SerializedObject(tempBN);
                MetaBean copy = (MetaBean)so.getObject();
                /*((Visible)copy).getVisual().
                  addPropertyChangeListener(KnowledgeFlowApp.this); */
                copy.addPropertyChangeListenersSubFlow(KnowledgeFlowApp.this);
                m_toolBarBean = copy;
              }
            } else {
              // modifications by Zerbetto
              //m_toolBarBean = Beans.instantiate(null, tempName);
              m_toolBarBean = Beans.instantiate(this.getClass().getClassLoader(),
                  tempName);

              // end modifications
            }
            if (m_toolBarBean instanceof WekaWrapper) {
	      Object wrappedAlg = 
		((WekaWrapper)tempBN).getWrappedAlgorithm();
	      
	      ((WekaWrapper)m_toolBarBean).
                setWrappedAlgorithm(wrappedAlg.getClass().newInstance());
	      //		    tempButton2.setSelected(false);
	    }
            if (changeCursor) {
              setCursor(Cursor.
                        getPredefinedCursor(Cursor.CROSSHAIR_CURSOR));
              m_mode = ADDING;
            }
	  } catch (Exception ex) {
	    System.err.
	      println("[KnowledgeFlow] Problem adding bean to data flow layout");
            ex.printStackTrace();
	  }
          notifyIsDirty();
	}
      });
    
    if (tempBean instanceof MetaBean) {
      tempButton.setToolTipText("Hold down shift and click to remove");
      m_userComponents.add(tempBean);
    } else {
      // set tool tip text from global info if supplied
      String summary = getGlobalInfo(tempBean);
      if (summary != null) {
        int ci = summary.indexOf('.');
        if (ci != -1) {
          summary = summary.substring(0, ci + 1);
        }
        tempButton.setToolTipText(summary);
      }
    }

    //return tempBean;
    return tempP;
  }