The problem is thus: I have a slightly modified JTable implementation inside of a JScrollPane. The JTable then has a TransferHandler registered so that items can be reordered, and inserted into each other.
The problem is that once the drag and drop functionality that we get for free from Java kicks in, the scrolling doesn’t get the appropriate MouseEvents for autoscroll to work.
I have seen obscure rferencs to this on the JavaDoc (http://docs.oracle.com/javase/7/docs/technotes/guides/swing/1.4/dnd.html).
But I cannot find a diffinitive solution, or anyone else referencing the same problem… So is there anyone put there with some helpful knowledge?
The cause of this behaviour is the drag and drop behaviour and the fact that
the TransferHandler isn’t configured to support autoscroll. The TransferHandler
is taking over the mouse events once a drag and drop is initiated, which means
the autoscroll behaviour of the JTable doesn’t get executed.
There are only obscure and vague references to this in the documentation, links
are provided below:
http://docs.oracle.com/javase/7/docs/technotes/guides/swing/1.4/dnd.html
(keyword: BasicDropTargetListener)
http://www.mpi-inf.mpg.de/departments/d5/teaching/ss05/is05/javadoc/javax/swing/plaf/basic/BasicDropTargetListener.html