JavaFX - Drag and Drop TableCell
<p>I've got a TableView with cells in it. My Table works like a Coordinate System, not like a usual Table. <a href="https://stackoverflow.com/questions/37718226/javafx-tableview-new-values-in-new-cell-in-same-row">Click here for more about this.</a></p>

<p>Now, i need to Drag and Drop one Cell to another (Move).</p>

<p>Here is my Code for Drag and Drop:</p>

<pre><code>tableView.setOnDragDetected(new EventHandler&lt;MouseEvent&gt;() {
        @Override
        public void handle(MouseEvent event) {
            Dragboard db = tableView.startDragAndDrop(TransferMode.MOVE);
            ClipboardContent content = new ClipboardContent();

            int x = tableView.getSelectionModel().getSelectedCells().get(0).getColumn();
            int y = tableView.getSelectionModel().getSelectedCells().get(0).getRow();

            for(Event e:eventList) {
                if(e.getAblaufX() == x &amp;&amp; e.getAblaufY() == y) {
                    //System.out.println("Event Abteilung: " + e.getAbteilung());
                    content.put(Config.SERIALIZED_MIME_TYPE, e.getId());
                }
            }

            db.setContent(content);
            event.consume();
        }
    });

    tableView.setOnDragDropped(new EventHandler&lt;DragEvent&gt;() {
        @Override
        public void handle(DragEvent event) {
            System.out.println("Drag Dropped!");

            Dragboard db = event.getDragboard();
             if (db.hasContent(Config.SERIALIZED_MIME_TYPE)) {
                 int draggedEventId = (Integer) db.getContent(Config.SERIALIZED_MIME_TYPE);
                 Event draggedEvent = null;
                 //System.out.println("Dragged Event ID: " + draggedEventId);
                 for(Event e:eventList) {
                     if(e.getId() == draggedEventId) {
                         draggedEvent = e;
                         eventMap.get(e).setAblaufX(ablaufX); // &lt;-- HERE I NEED CELL INDEX
                         eventMap.get(e).setAblaufY(ablaufY); // &lt;-- HERE I NEED ROW INDEX
                         //eventMap.put(new TablePos(draggedEvent.getAblaufX(), draggedEvent.getAblaufY()), draggedEvent);
                     }
                 }
                 if(draggedEvent != null) {
                     event.setDropCompleted(true);
                     event.consume();
                     System.out.println(draggedEvent.getText());
                 }
             }
        }
    });

    tableView.setOnDragOver(new EventHandler &lt;DragEvent&gt;() {
        public void handle(DragEvent event) {
            event.acceptTransferModes(TransferMode.ANY);
            event.consume();
        }
    });
</code></pre>

<p>I commented the tricky lines with "<code>// &lt;-- HERE I NEED CELL INDEX</code>" and "<code>// &lt;-- HERE I NEED ROW INDEX</code>"</p>

<p>On those lines, I need the columnIndex and the rowIndex of the dropped Cell (the new Cell)</p>