boolean (TransferHandler.TransferSupport support) { TableModel tableModel = myTable.getModel(); if (!(tableModel instanceof MultiReorderedModel) || !((MultiReorderedModel)tableModel).canMoveRows()) return false; JTable.DropLocation dl = (JTable.DropLocation)support.getDropLocation(); int index = dl.getRow(); int max = tableModel.getRowCount(); if (index < 0 || index > max) { index = max; } myTable.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); try { int[] rows = ((RowsDragInfo)support.getTransferable().getTransferData(ourFlavor)).myRows; if (rows != null && rows.length > 0) { int dist = 0; for (int row : rows) { if (index > row) { dist++; } } index -= dist; int[] newSelection = ((MultiReorderedModel)tableModel).moveRows(rows, index); TableUtil.selectRows(myTable, newSelection); return true; } } catch (Exception e) { LOG.error("Couldn't move transferred data."); } return false; }