title: MouseEvent of JTabbedPane
body: <p>I want to show a small popup menu when you right-click a tab, now this is working fine but when you right click it also selects that tab which is unwanted. </p>
  
  <p>So my idea was to make a new class, extend JTabbedPane and recode those mouse events. Problem is that I have no idea where to start, I was browsing its <a href="http://kickjava.com/src/javax/swing/JTabbedPane.java.htm" rel="nofollow" title="source of JTabbedPane">source</a> but I can't find what part is handeling the mouseEvents.</p>
  
  <pre><code>Tabs.addMouseListener(new MouseAdapter() {
      @Override
      public void mouseClicked(MouseEvent me) {
          if(me.getButton()==3){
              int tabNr = ((TabbedPaneUI)Tabs.getUI()).tabForCoordinate(Tabs, me.getX(), me.getY());
              Component clickedTab = EventsConfig.window.MainTabs.getComponentAt(tabNr);
              newMenu(clickedTab, me.getX(), me.getY());
          }
      }
  });  
  </code></pre>