title: Determine the fx:id of a pressed button
body: <p>I am trying to set up a method used by three different buttons. I want to load one of three different views depending on which of them is pressed. To do so, I thought about passing as an argument the button itself. But I was unable, due to javaFX not recognising the method with the new argument.</p>
  
  <p>How can I get the <code>fx:id</code> of the caller button so I can make the distinction between each of them? Here's what I got this far. I just need to initialize <code>pressed</code> variable so it will do its thing.</p>
  
  <pre><code>if (pressed == edgeModify){
      loader = new FXMLLoader(getClass().getResource("/digitalia/view/edgeView.fxml"));
  } else if (pressed == sectionModify){
      loader = new FXMLLoader(getClass().getResource("/digitalia/view/sectionView.fxml"));
  } else {
      loader = new FXMLLoader(getClass().getResource("/digitalia/view/LayerView.fxml"));
  }
  </code></pre>