            [java.util Vector]
            [java.awt Toolkit Dimension Point]
            [java.awt.event KeyEvent ActionEvent ActionListener MouseEvent
-                        MouseListener InputEvent]
+                        InputEvent]
            [java.awt.datatransfer DataFlavor StringSelection]
-           [javax.swing.event TreeSelectionListener TableModelListener]
+           [javax.swing.event TreeSelectionListener TableModelListener 
+             MouseInputListener ]
            [javax.swing.table DefaultTableModel])
   (:use clojure.contrib.swing-utils
         [clojure.contrib.string :only (join split-lines split)])

                                (if (not= start-col end-col)
                                  (move-column widget start-col end-col))
                                (if (not= start-row end-row)
                                  (move-row widget start-row end-row))))),


        cell-permutor (proxy-mouse-listener button-down-event
                                            button-up-event
                                            ignore-event
                                            ignore-event
                                            ignore-event)]
    (add-hook widget "table-changed"
      (fn [c f l t] (table-change-hook widget c f l t))
      "This hook is called whenever a table widget is changed,

      (mouseExited [event]
        (with-swing-threads* (exited (translate-event event))))
      (mouseClicked [event]
        (with-swing-threads* (clicked (translate-event event))))
      (mouseMoved [event]
        (with-swing-threads* (message-box "MOVED")
          (moved (translate-event event))))
      (mouseDragged [event]
        (with-swing-threads* (dragged (translate-event event)))))))



;;; managed/unmanaged interop
