                             (draw-primitive g2d %))
            (denest (expand widgets))))))
 
+(defn draw-error [graphics e]
+  (draw graphics
+        [{:type :text
+          :left 0
+          :top 20
+          :text (.getMessage e)}]))  
+
 (defn canvas
   "Create a blank JPanel \"canvas\" for automatic painting. The
   canvas is automatically updated with the graphics description

                 0 0 w h
                 (or arc-radius arc-width)
                 (or arc-radius arc-height))))


(defn font-object
  "Create a java font object with various properties."

                     GraphicsEnvironment
                     Graphics2D GradientPaint Image
                     Polygon RenderingHints Shape)
           (java.awt.event MouseAdapter)
           (java.awt.font TextAttribute)
           (java.awt.image BufferedImage)
           (javax.swing JFrame JPanel JScrollPane JTextArea)
