MouseInputAdapter starter = new MouseInputAdapter()
{
@Override
public void mousePressed(MouseEvent e)
{
TransferHandler handler = (TransferHandler)
ReflectionUtils.invokeMethod("getTransferHandler", component,
new Class[] {}, new Object[] {});
handler.exportAsDrag(component, e, transferType);
}
};
component.addMouseListener(starter);