title: What are the differences between `setOnMouseMoved` and `onMouseMovedProperty` JavaFx
body: <p>The action is perform when mouse moved in to the object defined in <code>group</code>, coordinates are printed out at which the mouse drops. I found this could be achieved by these two methods:</p>
  
  <pre><code>    // method 1:
      group.setOnMouseMoved(new EventHandler&lt;MouseEvent&gt;() {
          @Override
          public void handle(MouseEvent event) {
              System.out.printf("coordinate X: %.2f, coordinate Y: %.2f\n",event.getX(),event.getY());
          }
      });
  
      // method 2:
      group.onMouseMovedProperty().set(new EventHandler&lt;MouseEvent&gt;() {
          @Override
          public void handle(MouseEvent event) {
              System.out.printf("coordinate X: %.2f, coordinate Y: %.2f\n",event.getX(),event.getY());
          }
      });
  </code></pre>
  
  <p>Both gave me the expected results. The syntax looks almost the same, I just wondered if there's any difference between those two? When do we use one from the other?</p>