SOLVED . The question is closed. I implemented dnd using
DragSource.getDefaultDragSource().createDefaultDragGestureRecognizer(tableHeader, ...)
One note: dnd violates the default behavior of columns. My workaround was
public void dragGestureRecognized(DragGestureEvent dge) { if (dge.getDragAction() == DnDConstants.ACTION_COPY) return; try { dge.startDrag(null, new MyTransferable()); } catch (InvalidDnDOperationException e2) { System.out.println(e2); } }
so that I can rearrange the columns with the Ctrl key pressed. This is enough for me.
source share