Ejemplo n.º 1
0
  /**
   * Creates a new <code>BeanInstance</code> instance given the fully qualified name of the bean
   *
   * @param container a <code>JComponent</code> to add the bean to
   * @param beanName the fully qualified name of the bean
   * @param x the x coordinate of the bean
   * @param y th y coordinate of the bean
   */
  public BeanInstance(JComponent container, String beanName, int x, int y, Integer... tab) {
    m_x = x;
    m_y = y;

    // try and instantiate the named component
    try {
      m_bean = Beans.instantiate(null, beanName);
    } catch (Exception ex) {
      ex.printStackTrace();
      return;
    }

    addBean(container, tab);
  }
Ejemplo n.º 2
0
 /**
  * Creates a new <code>BeanInstance</code> instance.
  *
  * @param container a <code>JComponent</code> to add the bean to
  * @param bean the bean to add
  * @param x the x coordinate of the bean
  * @param y the y coordinate of the bean
  */
 public BeanInstance(JComponent container, Object bean, int x, int y, Integer... tab) {
   m_bean = bean;
   m_x = x;
   m_y = y;
   addBean(container, tab);
 }