Transferable (JComponent c) { assert (c == myTable); return new Transferable() { @Override public DataFlavor[] getTransferDataFlavors() { return new DataFlavor[]{ourFlavor}; } @Override public boolean isDataFlavorSupported(DataFlavor flavor) { return ArrayUtil.contains(flavor, getTransferDataFlavors()); } @Override public @NotNull Object getTransferData(DataFlavor flavor) { return new RowsDragInfo(myTable.getSelectedRows()); } }; }