title: Mouse pressed event on Anchorpane javafx
body: <p>I am trying to make a mouse event work in my javaFx. i Want to be able to add a mouse event to my anchorpane but i cant seem to make it work.</p>
  
  <pre><code>        room = new AnchorPane();
      room.setId("AnchorPane");
      room.setOnMouseClicked(new EventHandler&lt;MouseEvent&gt;() {
  
          @Override
          public void handle(MouseEvent e) {
              // TODO Auto-generated method stub
  
          }
      });
  </code></pre>
  
  <p>Can anyone tell me what the problem is?</p>