         widget          (table-control. pane table hooks model 
                           (ref [identity identity])),
         cell-editor (proxy [DefaultCellEditor] [(JTextField.)]
-                      (isCellEditable [event] 
+                      (isCellEditable [event]
                         (if (isa? (type event) MouseEvent)
                           (do-swing-return
-                            (let [ pt (.getPoint event)
-                                   col (.columnAtPoint table pt)
-                                   row (.rowAtPoint table pt)
-                                   result (call-hook widget
-                                            "mouse-click-cell-editable-hook"
-                                            row col)]
+                            (let [pt     (.getPoint ^MouseEvent event)
+                                  col    (.columnAtPoint table pt)
+                                  row    (.rowAtPoint table pt)
+                                  result (call-hook widget
+                                                    "mouse-click-cell-editable-hook"
+                                                    row col)]
                               result))
                           true))),
         cell-renderer (proxy [DefaultTableCellRenderer] []

  "Selects a single cell given as view-coordinates in the given table control"
  [otable row column]
  (assert (keyword-isa? otable table-control))
  (.changeSelection (get-control otable) row column false false))

(defn-swing set-value-at-view
  "Sets the value of a cell in the table according to a view position."
  [otable row column contents]
  (assert (keyword-isa? otable table-control))
  (let [columns (get-column-count otable),
        rows  (get-row-count otable)]
    (if (>= column columns)
      (call-hook otable "extend-columns-to" (+ 1 column)))
    (if (>= row rows)
      (call-hook otable "extend-rows-to" (+ 1 row)))
    (.setValueAt (get-control otable) (str contents) row column)))

(defn set-value-at-index
  "Sets the value of a cell in the table according to the model

   clipboard."
  [obj]
  (assert (keyword-isa? obj table-control))
  (let [^JTable control (get-control obj),
        sel-columns (-> control .getSelectedColumns seq),
        sel-rows    (-> control .getSelectedRows seq),
        sel-pairs   (map (fn [y]
