title: How to get column and row Index of each element in big GridPane(15x15)
body: <p>I want to find the best solution for getting the column and row index of many elements in cells.</p>
  
  <p>For example I have GridPane(15x15). Each cell has Button component. I want to get index of row and column when mouseClicked event is indicated. I know how to do this manually:</p>
  
  <pre><code>@FXML Button btn1;
  
  btn1.setOnMouseClicked(e-&gt;{
              System.out.println("Row: "+ GridPane.getRowIndex(btn1));
              System.out.println("Column: "+ GridPane.getColumnIndex(btn1));
          });
  </code></pre>
  
  <p>But what to do this in my problem: 15x15 gridPane. It's not effective to declare every button and copying the same code for each component. Someone has a idea how to do this? </p>
  
  <p>//============================================================</p>
  
  <p>I have decided to prepare one method and link it to all button. It what I was looking for :).</p>
  
  <p>Thanks for answer</p>
  
  <pre><code>    @FXML 
          private void testClicked(MouseEvent e){
              Node src = (Node)e.getSource();
              System.out.println("Row: "+ GridPane.getRowIndex(src));
              System.out.println("Column: "+ GridPane.getColumnIndex(src));
  }
  </code></pre>