Code example for EventListenerList

0
   * Initializes the <code>CloseableTabbedPane</code> 
   * @param horizontalTextPosition the horizontal position of the text (e.g. 
   * SwingUtilities.TRAILING or SwingUtilities.LEFT) 
   */ 
  private void init(int horizontalTextPosition) {
    listenerList = new EventListenerList();
    addMouseListener(this);
    addMouseMotionListener(this);
  
    //setUI(new AquaCloseableTabbedPaneUI(horizontalTextPosition)); 
    if (getUI() instanceof MetalTabbedPaneUI)
      setUI(new CloseableMetalTabbedPaneUI(horizontalTextPosition));
    /* 
    else 
      setUI(new CloseableTabbedPaneUI(horizontalTextPosition)); 
   */ 
  } 
  
  /** 
   * Allows setting own closeicons.