title: javaFX 2- Listner inside Contorller
body: <p>Would like to use drag and drop feature in controller (see below). But as tableView.getParent() is NULL, my listner is not working. Can you pleae help here? I do not want to move code to main class.</p>
  
  <pre><code>public class CenterController implements Initializable {
  @FXML public TableView&lt;Swap&gt; tableView;
  public void initialize(URL location, ResourceBundle resources) {
  loadDragDrop(tableView.getParent());
  }
   public void loadDragDrop(final Node n){
          n.setOnDragOver(new EventHandler&lt;DragEvent&gt;() {
              @Override
              public void handle(DragEvent event) {
                  Dragboard db = event.getDragboard();
                  if (db.hasFiles()) {
                      event.acceptTransferModes(TransferMode.COPY);
                  } else {
                      event.consume();
                  }
              }
          });
      n.setOnDragDropped(new EventHandler&lt;DragEvent&gt;() {
              @Override
              public void handle(DragEvent event) {
                  Dragboard db = event.getDragboard();
  
  
                  boolean success = false;
              event.setDropCompleted(success);
                  event.consume();
              }
          });
      }
  </code></pre>