title: Getting a mouse position with JavaFX and Event
body: <p>I'm trying to get the position of a mouse click in my JavaFX application. I have an EventHandler as so:</p>
  
  <pre><code>EventHandler&lt;Event&gt; mouseHandler = new EventHandler&lt;Event&gt;() {
      @Override
      public void handle(Event event) {
          String eType = event.getEventType().toString();
          if(eType.equals("MOUSE_PRESSED")){
              //mouse position
          }
      }
  };
  </code></pre>
  
  <p>which is called on mouse press, release and drag. I'm unable to get the position of the mouse from <code>Event</code> and when I try and change <code>EventHandler&lt;Event&gt;</code> to <code>EventHandler&lt;MouseEvent&gt;</code> I get the message <code>Type paremeter 'java.awt.event.MouseEvent' is not within it's bounds;  should extend to 'javafx.event.Event'</code>.</p>
  
  <p>How can I move this over to MouseEvents?</p>