title: Javafx how to simulate a right click event on Tab
body: <p>I have a <code>Tab</code> and i want to programmatically trigger a right click event, to pop up my <code>ContextMenu</code>, set on the Tab</p>
  
  <pre><code>Tab tab = new Tab("Some tab that has no graphic and doesnt need graphic");
  tab.setContextMenu(new ContextMenu(new MenuItem("go")));
  //add it to a tabPane.
  //now when i want to trigger a right click i do this
   Event rightClick = new MouseEvent(MouseEvent.MOUSE_CLICKED, 0, 0, 0, 0, MouseButton.SECONDARY,
                  1, false, false, false, false, false, false, false, false, true, false, null);
  MouseEvent.fireEvent(tab, rightClick);//but it doesnt work why??
  </code></pre>
  
  <p>i have even altered the code this way</p>
  
  <pre><code> Event rightClick = new MouseEvent(MouseEvent.MOUSE_CLICKED, 0, 0, 0, 0, MouseButton.SECONDARY,
                  1, false, false, false, false, false, false, true, false, true, false, null); //still no
  </code></pre>
  
  <p>on any ordinary node the above code works, just <code>Tab</code> </p>
  
  <p><em>i need a javafx way</em></p>