   (:import (javax.swing AbstractAction JComponent JFrame JPanel JLabel KeyStroke)
            (java.awt Color Graphics Graphics2D Rectangle RenderingHints Window)
            (java.util UUID)
-           (java.awt.event ComponentAdapter MouseAdapter WindowAdapter)
+           (java.awt.event ComponentAdapter KeyEvent KeyAdapter
+                           MouseAdapter WindowAdapter)
            (org.micromanager.utils GUIUpdater))
   (:use [org.micromanager.mm :only (edt)]
         [slide-explorer.image :only (crop merge-and-scale overlay lut-object)]))

    (handle-wheel panel screen-state)
    (handle-resize panel screen-state)
    (handle-zoom frame screen-state)
    (display-follow panel screen-state)
    (display-follow panel available-tiles)
    frame))

  (bind-window-keys window ["SUBTRACT" "OPEN_BRACKET"]
                   (fn [] (swap! zoom-atom update-in [:zoom] #(max MIN-ZOOM (dec %))))))

(defn watch-keys [window key-atom]
  (let [key-adapter (proxy [KeyAdapter] []
                      (keyPressed [e]
                                  (swap! key-atom update-in [:keys] conj
                                         (KeyEvent/getKeyText (.getKeyCode e))))
                      (keyReleased [e]
                                   (swap! key-atom update-in [:keys] disj
                                          (KeyEvent/getKeyText (.getKeyCode e)))))]
    (doseq [component (descendants window)]
      (.addKeyListener component key-adapter))))

;; MAIN WINDOW AND PANEL

(defn main-panel [screen-state available-tiles]
