                                 (draw graphics @reference)))]
     (add-watch reference panel (fn [_ _ _ _]
                                  (.repaint panel)))
+    (.setBackground panel Color/BLACK)
     panel))
 
 ;; test


(defmethod draw-primitive Shape
  [g2d shape {:keys [color fill stroke] :as params}]
  (with-g2d-state [g2d params]
                  (when fill
                    (when-let [fill-color (:color fill)]
                      (doto g2d
                        (set-color fill-color)
                        (.fill shape))))
                  (when (stroke? stroke)
                    (doto g2d
                      (set-color (or (:color stroke) color :black))
                      (.draw shape)))))

(defmethod draw-primitive Image
  [g2d image params]

        h (or (:h params) (.getHeight image))
        params+ (complete-coordinates (assoc params :w w :h h))
        {:keys [l t]} params+]
    (.drawImage g2d image (- (/ w 2)) (- (/ h 2)) w h nil)))

(defn draw-string-center
  "Draw a string centered at position x,y."
