   "Figure out how many pixels wide some text will be in a given font."
   [graphics font text]
   (let [context (.getFontRenderContext graphics)]
-    (.getWidth (.getStringBounds text context))))
+    (.getWidth (.getStringBounds font text context))))
 
 (defn draw-bottom-button-label
   "Draw a label for a button below the graphical display."

    ;; Is the first cell reserved for metronome information?
    (if (seq metronome-mode)
      (let [graphics (create-graphics controller)
            bpm (format "%.1f" (double (:bpm snapshot)))
            chars (+ (count marker) (count bpm))]
        ;; Draw the background that makes the metronome section distinctive.
        (set-graphics-color graphics metronome-background)
        (.fillRect graphics 0 0 (* 2 button-cell-width) Wayang/DISPLAY_HEIGHT)

        ;; Draw the beat and BPM information
        (set-graphics-color graphics white-color)
        (draw-cue-variable-value controller 0 1 marker white-color)
        (draw-cue-variable-value controller 1 1 bpm white-color)
        (draw-encoder-button-label controller 0 1 "Beat" white-color)
        (draw-encoder-button-label controller 1 1 "BPM" white-color)

        ;; Make the metronome button bright, since some overlay is present
        (swap! (:next-text-buttons controller) assoc metronome-button white-color))

               (reify controllers/IOverlay
                 (captured-controls [this] #{72})
                 (captured-notes [this] #{1 9})
                 (adjust-interface [this snapshot]
                   (bpm-adjusting-interface controller snapshot)
                   true)
                 (handle-control-change [this message]
                   (adjust-bpm-from-encoder controller message))
