I am trying to drag multiple rows (discontinuous ) from a jtable to a jtree. I am using a customized transferable object and a customized transferhandler. However,I lose my objects within the import data method, as it gets lost inside the java method getTransferData(DataFlavor df) within class DropTargetContext.java. The code is as follows:
The class cObject is serializable. The customized transfer handler is declared as an inner class within the panel that contains both tree and table.
The transferable object t has the objects in array list correctly but when I call t.getTransferData, the array list comes back the null objects. E.g. if three rows were chosen from the table, This calls getTransferData method in cObjectList which returns these objects in the arraylist correctly but when it reaches getTransferData in DropTargetContext.java the values nside the array list return as null even thought the list/ object itself still shows size =3.